一般我们会这样使用


curl_setopt($ch, CURLOPT_COOKIEJAR, $this->_cookiefile);
        curl_setopt($ch, CURLOPT_COOKIEFILE, $this->_cookiefile);

这里的cookiefile很多时候我们都使用相对路径,这时候就会出现问题,保存不了cookie,而且还找不到问题的原因


那么,这里的文件路径使用绝对路径,比如dirname(__FILE__).'/cookie.txt'