? ??? win10??? ???? ?? ?? ? ???, ? win7??? ?_exec($ch)? ?? ?? ?? false???. ?? ?? ???(0) ""? ?_??($ch)? ??? ????.
?? PHP ??? ????? ?? ????? ??? ???.
??? ???????
http://php.net/manual/zh/curl...
?? ???
libeay32.dll
libssh2.dll
ssleay32.dll
? ? ??? ?????
C:\Program Files\Apache Software Foundation\Apache2.4\bin
? ?????? ???? ?? ??? ??? ??? ??? false???.
? PHP ??? 5.6.23???. ??? ?? ??? ????? ???????. ?? ??? ??? ??? ?? ????, ?? ??? ?????? ?? ????. ?? ?????.
??? ??? ??? ????.
$ch = ?_init();
?_setopt($ch, CURLOPT_URL, $url);
$??=??(
// 'W-ACCESS-TOKEN: '.$access_token,
'??? ??: ??????/json'
);
//?? ??
?_setopt($ch, CURLOPT_HTTPHEADER, array_merge($headers,$app_headers));
?_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
?_setopt($ch, CURLOPT_POST, 1);
?_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
// ?_setopt($ch, CURLOPT_COOKIE, implode(';', $cookies_items));
?_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
if($method=='PUT'){
?_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
}elseif($method=='??'){
?_setopt($ch, CURLOPT_CUSTOMREQUEST, "??");
}
$data = ?_exec($ch);
?_??($ch);
$data? ??;
?? ?????????. ?? ??? ??? ? ?? ??? ?????.
?? #7? ?? Curl? ??????: auc.qa2.test.yiran.com ?? 80? ???? ?????: ?? ??
?>4? 21? ?????
???.
??? ???? ????. ???? ???? ??? ?????.
認(rèn)證高級PHP講師
??? ???? ?_setopt? CURLOPT_RETURNTRANSFER? true? ????? ?????