An issue with file upload in PHP. I have been confused. In this document, the description is vague, that is, the move_uploaded_file function, which adds a step-by-step check to check whether the file has been uploaded by HTTPPOST. As for this, I am still confused. In this document, the description is vague, that is, the move_uploaded_file function, which adds a step-by-step check to check whether the file has been uploaded through http post,
As for how to check.
I haven't been able to solve this problem after google for a while, and I don't know where it is. Later, I finally decided to read the source code. Finally, the file name and
The upload_tmp_dir parameter in the php configuration is compared. if the file is under this directory, move_uploaded_file will be moved. In addition, the comparison is case sensitive, and/\ is also different in Windows. When parsing the PHP configuration file, a realpath function is called, that is, before move_uploaded_file,
For $ file ['tmp _ name'] = realpath ($ file ['tmp _ name']); realpath.
In another case, you should note that if move_uploaded_file is configured as an inaccessible path, no matter how you handle it, move_uploaded_file will not be able to successfully move the file.
Bytes. In this document, the description is vague, that is, the move_uploaded_file function, which adds a step-by-step check to check whether the file has been uploaded through http post. as ,...