$description = "some test data and url";
$description .="http://www.mydata.com?test=1&user=4&destination=645&source=stackoverflow";
curl_setopt($sch, CURLOPT_URL, "myserverurl");
curl_setopt($sch, CURLOPT_HEADER, 0);
curl_setopt($sch, CURLOPT_POST, true);
curl_setopt($sch, CURLOPT_RETURNTRANSFER , 1);
curl_setopt($sch, CURLOPT_POSTFIELDS, "orgid=$orgid&description=$description&external=1");
curl_setopt ($sch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($sch, CURLOPT_SSL_VERIFYPEER, 0);
当我检查服务器(myserverurl)时。
我可以看到描述字段
“一些测试数据和网址http://www.mydata.com?test=1 ”。
我在“&”之后丢失了描述
是的,我们可以在使用 curl 发送之前对 url 进行编码,但我无法在该第三方 api 服务器上再次解码 url