PHP move_uploaded_file () function

Source: Internet
Author: User
Definition and usage

The move_uploaded_file () function moves the uploaded file to the new location.

If yes, true is returned. Otherwise, false is returned.

Syntax
Move_uploaded_file (file, newloc)
Parameters Description
File Required. Specifies the file to be moved.
Newloc Required. Specifies the new location of the file.
Description

This function checks and ensures thatFileThe specified file is a valid Upload File (that is, it is uploaded through the http post upload mechanism of PHP ). If the file is valid, move itNewlocThe specified file.

IfFileIf the file is not uploaded legally, no operation is performed. move_uploaded_file () returns false.

IfFileIt is a valid file to be uploaded, but it cannot be moved for some reason and no operation will occur. move_uploaded_file () will return false, and a warning will be issued.

This check is especially important. If the uploaded file may display the content to users or other users in the system

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.