Latest web development tutorials

PHP move_uploaded_file () function

PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual

Definition and Usage

move_uploaded_file () function to move uploaded file to a new location.

If successful, the function returns TRUE, on failure returns FALSE.

grammar

move_uploaded_file(file,newloc)

参数 描述
file 必需。规定要移动的文件。
newloc 必需。规定文件的新位置。


Tips and Notes

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

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


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual