Home  >  Article  >  php教程  >  PHP file upload [function.move-uploaded-file]: failed to open stream error solution

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

WBOY
WBOYOriginal
2016-07-09 09:10:241755browse

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

Statement:
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