Curl_Setopt()出错

Curl_Setopt()出错

问题描述:

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in line 161 -- point to curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);

on local development it work just fine, but on web server it gave this error. I couldn't figure what is wrong with setopt?

警告:curl_setopt()[function.curl-setopt]:启用safe_mode或open_basedir时无法激活CURLOPT_FOLLOWLOCATION 在第161行设置 - 指向 curl_setopt($ curl_connection,CURLOPT_FOLLOWLOCATION,1); code> p>

本地开发它工作正常,但在Web服务器上它 给出了这个错误。 我无法想象setopt有什么问题? p> div>

Your web host probably has PHP safe mode enabled, which restricts the functions that you can run.

A workaround can be found here:

http://www.edmondscommerce.co.uk/curl/php-curl-curlopt_followlocation-and-open_basedir-or-safe-mode/