【发布时间】:2013-01-11 17:02:44
【问题描述】:
我在尝试使用 php 将上传的文件从临时文件夹移动到所需的文件时收到以下警告
警告:move_uploaded_file(test/) [function.move-uploaded-file]:无法打开流:是第 69 行 /home/..../filename.php 中的目录
警告:move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpKrCpQw' to 'test/' in /home/..../filename.php on line 69
以下是给出错误的第 67 和 69 行:
$destination = "test/". $name;
$answer = move_uploaded_file($_FILES['user_file']['tmp_name'],$destination);
【问题讨论】:
-
$destination显然是'test/'。$name显然是空的。
标签: php file-upload warnings