💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## parse_str 处理http的query参数 ~~~ $str = 'bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}&my_var1=${x:var1}&my_var2=${x:var2}'; echo '<pre>'; parse_str($str,$arr); var_dump($arr); ~~~ ![](https://img.kancloud.cn/a3/8e/a38e2a432174adb57276be90ca8d0e6f_267x338.png) ## parse_url 解析url地址的 ~~~ $str = 'https://test.com?bucket=${bucket}&object=${object}'; echo '<pre>'; var_dump(parse_url($str)); ~~~ ![](https://img.kancloud.cn/16/b5/16b596f239d60492bb62ad8de6e922b2_356x135.png)