在用curl_setopt($curl, CURLOPT_POSTFIELDS, $fileData);这个函数设置时会报错如下 curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead 查看了相关文档发现如下一段话 根据这个提示 得把老版本中的请求参数如 $fileData = ['media' => "@&…
当系统开启safe_mode和 open_basedir,在程序中使用以下语句 curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); 并且遇到301,302状态吗时会出现错误 [11-Oct-2010 14:17:41] PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in m…