我收到以下警告我无法使用php上传文件?
Warning: copy(file.txt) [function.copy]: failed to open stream: No such
file or directory in /users/abc/pantry/public_html/index.php on line 5
Could not copy file!
<?php
if ($_FILES['file']['name'] != "") {
copy($_FILES['file']['name'], "https://stackoverflow.com/users/abc/pantry/public_html/temp/") or die("Could not copy file!");
} else {
die("No file specified!");
}
?>
即使文件夹TEMP内存在与777的权限。
该OP的问题也是,PHP无法找到服务器上的文件的临时名称 –
它的工作。谢谢。 – pcoder