Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
程序员文章站
2023-12-24 17:21:09
...
今天文件上传出现Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
"" enctype="multipart/form-data" method="post">
运行结果:
Warning: move_uploaded_file(10/02.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in E:appserv-win32-2.5.10AppServwww10index_7.php on line 26
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:WINDOWStempphp1A.tmp' to '10/02.jpg' in E:appserv-win32-2.5.10AppServwww10index_7.php on line 26目录路径出错!
方法一:解决办法,将
move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"]) 改为:
move_uploaded_file($_FILES["file"]["tmp_name"],"d:/" . $_FILES["file"]["name"])
方法二:Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move,上传的时候出现类似这种报错,原因是目录权限是否为可写的问题。
一般设置777就可以解决,修改权限命令:
chmod 777 filename chmod 777 dirname sudo chmod 777 filename/dirname chown wangr:admin dirname -R
注:-R 批量执行
本文地址:
转载随意,但请附上文章地址:-)
推荐阅读
-
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
-
php 上传图片,一直提示Warning: move_uploaded_file(.upload/en.jpg): failed to open stream
-
php 上传图片,一直揭示Warning: move_uploaded_file(.upload/en.jpg): failed to open stream
-
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
-
Warning: move_uploaded_file() [function.move-uploaded-file]:_PHP教程
-
linux Warning: move_uploaded_file() 有权限 存在目录 神级般的有关问题
-
php 上传图片,一直提示Warning: move_uploaded_file(.upload/en.jpg): failed to open stream
-
Warning: move_uploaded_file() [function.move-uploaded-file]:
-
linux Warning: move_uploaded_file() 有权限 存在目录 神级般的有关问题
-
Warning: move_uploaded_file() [function.move-uploaded-file]: