我得到否認權限,當我使用fopen
在WAMP服務器的文件夾在Windows上:權限被拒絕上的fopen
# open file to write
$fp = fopen ($path, 'w+');
# start curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
# set return transfer to false
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
# increase timeout to download big file
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
# write data to local file
curl_setopt($ch, CURLOPT_FILE, $fp);
# execute curl
curl_exec($ch);
# close curl
curl_close($ch);
# close local file
fclose($fp);
歡迎堆棧溢出。請閱讀常見問題解答,瞭解如何正確設置問題的格式,以便獲得社區的最佳答覆。 http://stackoverflow.com/help – webnoob
請提供適當的細節,並以適合其他人理解的格式提出您的問題。 – Akshat
你試過或死()來得到錯誤? – Lefsler