Move_uploaded_file () Why can't I move the uploaded file?

Source: Internet
Author: User

send.php

receive.php


  
   

Please take a look at the above two files code, send.php upload files to receive.php
I uploaded a picture, upload succeeded, mobile but failed, is a hint.

What is the reason, please? How do I fix it?

Thank you

P.S I used a local server built by Phpstudy. win8.1 x64, some people say that the authority is not enough, how to improve the authority? Thank you

Reply content:

send.php

receive.php


  
   

Please take a look at the above two files code, send.php upload files to receive.php
I uploaded a picture, upload succeeded, mobile but failed, is a hint.

What is the reason, please? How do I fix it?

Thank you

P.S I used a local server built by Phpstudy. win8.1 x64, some people say that the authority is not enough, how to improve the authority? Thank you

Move_uploade_file The second parameter is the path of the file you want to save, remember that including the filename, including the file name

Windows systems can be used with almost no permissions
The second argument to Move_upload_file is the file name, not the path
http://www.php.net/manual/zh/...

The path to the destination is incorrectly written.

Move_uploaded_file The second parameter is the mobile address, your code is obviously the Linux style path root directory/. If it is windows please write D:\www this form

Check out the manual before you ask for questions like that.

The second parameter is wrong, specify the folder path, if it is Linux set the folder write permissions.

The error message is written to you so clearly.
The second parameter cannot be a directory, write the full path, including the file name.

  • Related Article

    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.