Name

move_uploaded_file

Synopsis

bool move_uploaded_file(string from, string to)

Moves the file from to the new location to. The function moves the file only if from was uploaded by an HTTP POST. If from does not exist or is not an uploaded file, or if any other error occurs, false is returned; if not, if the operation was successful, true is returned.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.