Warning: move_uploaded_file () [function. move-uploaded-file]: Unabletomove

Source: Internet
Author: User
Warning: move_uploaded_file () [function. move-uploaded-file]: Unabletomovequot; quot; n... warning: move_uploaded_file () [function. move-uploaded-file]: Unable to move

"" enctype="multipart/form-data" method="post">

Running result:

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 '2012 .jpg 'in E: appserv-win32-2.5.10AppServwww10index_7.php on line 26 directory path error!

Method 1: solution,Set

Move_uploaded_file ($ _ FILES ["file"] ["tmp_name"], "upload/". $ _ FILES ["file"] ["name"])Changed:

Move_uploaded_file ($ _ FILES ["file"] ["tmp_name"], "d:/". $ _ FILES ["file"] ["name"])

Method 2: Warning: move_uploaded_file () [function. move-uploaded-file]: Unable to move. an error similar to this occurs during Upload because the directory permission is writable.

Generally, you can set 777 to solve the problem. modify the permission command:

chmod 777 filename chmod 777 dirname sudo chmod 777 filename/dirname chown wangr:admin dirname -R

Note:-R batch execution



Address:

Reprinted at will, but please attach the article address :-)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.