开发者

cURL Error when using CURLOPT_FOLLOWLOCATION

开发者 https://www.devze.com 2022-12-12 03:13 出处:网络
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mod开发者_如何学JAVAe or an open_basedir is set in /home/public_html/curl.php on line
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mod开发者_如何学JAVAe or an open_basedir is set in /home/public_html/curl.php on line

Trying to use curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, TRUE); but I'm getting this error. How can I overcome it?


This is because your setup has either safe mode or open_basedir settings in the php.ini.

You need to change these settings in the php.ini to do this.


Try adding

curl_setopt($ch, CURLOPT_HEADER, 0);
0

精彩评论

暂无评论...
验证码 换一张
取 消