我在尝试使用 php 将上传的文件从临时文件夹移动到所需的文件夹时收到以下警告
警告:move_uploaded_file(test/) [function.move-uploaded-file]: failed to open stream: Is a directory in/home/..../filename.php on line 69
警告:move_uploaded_file() [function.move-uploaded-file]:无法将“/tmp/phpKrCpQw”移动到第 69 行的/home/..../filename.php 中的“test/”
以下是出现错误的第 67 行和第 69 行:
$destination = "test/". $name;
$answer = move_uploaded_file($_FILES['user_file']['tmp_name'],$destination);
最佳答案
你的名字好像是null
$destination = "test/". $name;
回显你的名字,看看那里有什么。
关于php - 无法打开流 : Is a directory in,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14560658/