使用curl抓取网页或图片很多次了,今天在php的“E_ALL | E_STRICT”模式下,shell下会有报错:
google搜索“+Notice: Use of undefined constant CURLOPT_GET - assumed 'CURLOPT_GET' in”,找到一篇文章《PHP CURLOPT_GET Does not Exist!》,原来,CURLOPT_GET本就不存在。
curl_setopt($ch, CURLOPT_GET, true);
注释掉改行即可。