Home > php教程 > php手册 > body text

PHP file upload [function.move-uploaded-file]: failed to open stream error solution

WBOY
Release: 2016-07-09 09:10:24
Original
1715 people have browsed it

The following error occurred during php file upload

Warning: move_uploaded_file(upload/pal4bz111.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory inE:EclipseWorkspacePHPTestfile_uploadt2.php on line 24
Warning: move_uploaded_file() [function.move-uploaded- file]: Unable to move 'D:xampplitetmpphp7FC5.tmp' to 'upload/pal4bz111.jpg' inE:EclipseWorkspacePHPTestfile_uploadt2.php on line 24
Stored in: upload/ pal4bz111.jpg

Solution

Move_uploaded_file($_FILES["file"]["tmp_name"],"

upload /

" . $_FILES["file"]["name"]) changed to

move_uploaded_file($_FILES["file"]["tmp_name"],"

d:/

" . $_FILES["file"]["name"])

Note: windows environment

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!