0
我想編寫一個腳本,它將從給定的URL下載zip文件並將其保存在我的硬盤中的某個位置。網址看起來像這樣。 http://localhost/downloads/1至http://localhost/downloads/1。我正在嘗試像這樣自動下載zip文件腳本
<?php
for($i=1;$i<=100;$i++){
$zipfile=file_get_contents('http://localhost/downloads'.$i);
echo $zipfile;}
但它不起作用。 我想在本地主機上嘗試這個腳本。 id會下載歌曲,照片給我。
「'http:// localhost/downloads/1'到'http:// localhost/downloads/1'」...?咦? – deceze 2010-10-13 06:22:24
糾正了我的錯誤。 – mysterious 2010-10-13 06:34:43