更新时间:2023-02-23 11:48:05
您可以使用 parse_url()将URL分成各自的部分.在parse_url
返回的数组中的query
元素上使用urlencode()
,然后使用
You can use parse_url() to split the URL into its respective pieces. Use urlencode()
on the query
element from the array that parse_url
returns, then put it back together using http_build_url.
注意:http_build_url
需要PECL pecl_http> = 0.21.0
NOTE: http_build_url
requires PECL pecl_http >= 0.21.0