相同的腳本在localhost中正常工作,但它不在服務器中工作。它拋出一些錯誤 -無法上傳圖片在PHP中,權限被拒絕?
Warning: copy(album/6349416.jpg) [function.copy]: failed to open stream: Permission denied in D:\Hosting\6448289\html\upload.php on line 112
對應的112線是 -
$image_name=$unq.'.'.$extension;
//the new name will be containing the full path where will be stored (album folder)
$newname="album/".$image_name;
$copied = copy($_FILES['image']['tmp_name'], $newname); //112th line
沒有任何理由,爲什麼你正在使用的不是副本move_uploaded_file? – teemitzitrone 2010-08-11 08:03:32