我使用代码:
public function GetPage($url, $post=false, $data=null){ //Function Auth
$this->refferer = $url;
curl_setopt($this->curl_obj, CURLOPT_URL,$url);
if($post == true){
curl_setopt($this->curl_obj, CURLOPT_POST, 1);
curl_setopt($this->curl_obj, CURLOPT_POSTFIELDS, $data);
} else {
curl_setopt($this->curl_obj, CURLOPT_POST, 0);
}
return curl_exec($this->curl_obj);
}
这个函数返回false,为什么?我怎样才能找出原因?