I think someone who thinks the same as I do this: the uploaded files just want to use temporarily, do not need to save the original files, such as resize, and these late operations will appear in the second round from the client request to operate, such as first upload, upload the temporary file path back to the browser, The user clicks on the temporary file to operate, but in the actual implementation found that the temporary file in two rounds of requests, unexpectedly did not exist, ran to the temporary folder to view and did not find.
I also met someone in a Q group who asked this question, and the reason is similar to my idea of this realization. So, there is a doubt, how to upload a file is the principle?
Do not want to see PHP implementation code, I think about the next, it should be a recycling mechanism: Click on the temporary file space, then, PHP itself should maintain the recovery of this space;
So I try to upload a huge file, big enough to let PHP run for a long time, I thought I would see it appear in the temporary folder. Unfortunately, I did not see it figure until PHP returns: Because this file exceeds the upload limit, and then I use the small file upload to print out its temporary folder path, found that it is the beginning of PHP, with the end of TMP file naming method;
I thought of a way to use while stuck uploading PHP this process for a certain amount of time to return, which I saw temporary files in the temporary folder, it is indeed named Php**.tmp,
If PHP parsing is aborted by using the normal end of PHP to refresh the page in the course of running, the temporary file will be permanently preserved.
If PHP is the normal end of the session, this file will be deleted at the end of PHP.
At the same time, I feel that this file should be uploaded after the completion of the upload: from my upload large files can not see its figure inference;
Therefore, the temporary file maintenance of PHP is PHP at the end of the recovery of resources, want to use this file in the second round of requests, should be moved after the maintenance of this file,
In this test, it was not tested when PHP include more than one nested case, at what time to recycle.
http://www.bkjia.com/PHPjc/328046.html www.bkjia.com true http://www.bkjia.com/PHPjc/328046.html techarticle I think someone who thinks the same as I do this: the uploaded files just want to use temporarily, do not need to save the original files, such as resize, and these later operations will appear ...