PHP move_uploaded_file()Functions


PHP Filesystem 参考手册Complete PHP Filesystem Reference

Definition and Usage

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

Returns TRUE on success or FALSE on failure.

Syntax

move_uploaded_file(file,newloc)

Parameter Description
file Required. Specifies the file to move.
newloc Required. Specifies the new location for the file.


Tips and Notes

Note:This function is only used for files uploaded via HTTP POST.

Note:If the destination file already exists, it will be overwritten.


PHP Filesystem 参考手册Complete PHP Filesystem Reference Other Extensions