Move_uploaded_file () why cannot I move uploaded files?

Source: Internet
Author: User
Send. php {code ...} receive. php {code ...} please refer to the code of the above two files, send. php uploads a file to receive. in php, I uploaded an image, and the upload was successful, but the movement failed. it is a prompt. What is the reason? How can this problem be solved? Thank you, p.s. I used it...

Send. php

Receive. php


  

See the code for the above two files. send. php uploads the file to receive. php
I uploaded an image, and the upload was successful, but the movement failed. it is a prompt.

What is the reason? How can this problem be solved?

Thank you.

P.s I am using a local server built by phpstudy. Win8.1 x64, some people say that the permission is not enough. how can I raise the permission? Thank you.

Reply content:

Send. php

Receive. php


  

See the code for the above two files. send. php uploads the file to receive. php
I uploaded an image, and the upload was successful, but the movement failed. it is a prompt.

What is the reason? How can this problem be solved?

Thank you.

P.s I am using a local server built by phpstudy. Win8.1 x64, some people say that the permission is not enough. how can I raise the permission? Thank you.

The second parameter of move_uploade_file is the file path you want to save. remember to include the file name, including the file name.

Permissions are almost unnecessary in Windows.
The second parameter of move_upload_file is the file name, not the path.
Http://www.php.net/manual/zh...

The target path to be moved is incorrect ..

The second parameter of move_uploaded_file is the mobile address. your code is obviously the linux-style path root directory /. For windows, write it as D: \ www.

We recommend that you check the manual before asking such questions.

The second parameter is incorrect. specify the folder path. for linux, set the write permission for the folder.

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

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.