How long the uploaded file will be stored somewhere in a temporary folder with the name $_FILES['file']['tmp_name']
?
$_FILES['file']['tmp_name'] - The temporary filename of the file in which the uploaded file was stored on the server.
PHP stores uploaded files in a temporary directory with temporary file names. You must move uploaded files to a permanent directory, if you want to keep them permanently. PHP offers the move_uploaded_file() to help you moving uploaded files. The example script, processing_uploaded_files.
Create The Upload File PHP Script$target_dir = "uploads/" - specifies the directory where the file is going to be placed. $target_file specifies the path of the file to be uploaded. $uploadOk=1 is not used yet (will be used later) $imageFileType holds the file extension of the file (in lower case)
The move_uploaded_file() function moves an uploaded file to a new destination.
It is in the documentation:
The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With