开发者

cURL Error when using CURLOPT_FOLLOWLOCATION

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜