php文件上传 [function.move-uploaded-file]: failed to open stream 错误解决办法
程序员文章站
2022-05-07 20:34:13
...
php文件上传中出现如下错误
Warning: move_uploaded_file(upload/pal4bz111.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory inE:\Eclipse\Workspace\PHPTest\file_upload\t2.php on line 24
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\xampplite\tmp\php7FC5.tmp' to 'upload/pal4bz111.jpg' inE:\Eclipse\Workspace\PHPTest\file_upload\t2.php on line 24
Stored in: upload/pal4bz111.jpg
解决办法
将
move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"])
改为
move_uploaded_file($_FILES["file"]["tmp_name"],"d:/" . $_FILES["file"]["name"])
注:windows环境
推荐阅读
-
php错误提示failed to open stream: HTTP request failed!的完美解决方法
-
php 上传图片,一直提示Warning: move_uploaded_file(.upload/en.jpg): failed to open stream
-
php 上传图片,一直揭示Warning: move_uploaded_file(.upload/en.jpg): failed to open stream
-
php错误提示failed to open stream: HTTP request failed!的完美解决方法
-
php错误提示failed to open stream: HTTP request failed!的完美解决方法_php技巧
-
php错误提示failed to open stream: HTTP request failed!的完美解决方法_php技巧
-
file_put_contents 错误:failed to open stream: Invalid argument 一种原因,invalidromcontents_PHP教程
-
Laravel访问出错错误信息:`Warning: require(/vendor/autoload.php): failed to open stream: No such file or dire
-
php文件上传 [function.move-uploaded-file]: failed to open stream 错误解决办法
-
php 上传图片,一直提示Warning: move_uploaded_file(.upload/en.jpg): failed to open stream