PHP move_uploaded_file() Function


❮ PHP Filesystem Reference

Definition and Usage

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

Note: This function only works on files uploaded via PHP's HTTP POST upload mechanism.

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

Syntax

move_uploaded_file(file, dest)

Parameter Values

Parameter Description
file Required. Specifies the filename of the uploaded file
dest Required. Specifies the new location for the file

Technical Details

Return Value: TRUE on success, FALSE on failure
PHP Version: 4.0.3+

❮ PHP Filesystem Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.