相同的脚本在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