Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP move_uploaded_file() Function

PHP move_uploaded_file() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


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)

Parameters Description
file Required. Specifies the file to move.
newloc Required. Specifies the new location of the file.

Tips and Notes

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

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


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual