→ MOONRAKER: 有時候command-line和apache的php版本會不一樣 安裝模 02/14 11:10
→ MOONRAKER: 組也不一樣 跑phpinfo()看有沒有裝curl 02/14 11:10
→ MOONRAKER: 不過你這樣沒有錯誤訊息嗎 02/14 11:11
→ Uname: 我一開始其實是跑出沒有安裝curl_init的錯誤 最後手動安裝 02/14 11:12
→ Uname: 一開始有錯誤訊息 但後來不知道為何 錯誤訊息沒有show了 02/14 11:13
→ Uname: 我以為是我把它解決掉了~謝謝M大 我先往apache版本去看看 02/14 11:14
→ MOONRAKER: 如果你curl_init()的訊息有消失 那就不清楚了… 02/14 14:56
推 chenxiaowoo: curl_init不需要設網址,一般是在curl_setopt()裡設 02/15 00:21
→ et69523820: $cinit = curl_init(); 02/15 02:37
→ et69523820: curl_setopt($cinit, CURLOPT_URL, $url); 02/15 02:37
→ et69523820: curl_setopt($cinit, CURLOPT_TIMEOUT, 5); 02/15 02:38
→ et69523820: curl_setopt($cinit, CURLOPT_RETURNTRANSFER, true); 02/15 02:38
→ et69523820: curl_setopt($cinit, CURLOPT_BINARYTRANSFER, true); 02/15 02:38
→ et69523820: curl_setopt($cinit, CURLOPT_FAILONERROR, true); 02/15 02:38
→ et69523820: curl_setopt($cinit, CURLOPT_POST, true); 02/15 02:38
→ et69523820: curl_setopt($cinit, CURLOPT_POSTFIELDS, 02/15 02:39
→ et69523820: http_build_query($postdata)); 02/15 02:39
→ et69523820: curl_exec($cinit); 02/15 02:40
→ et69523820: curl_close($cinit); 02/15 02:40