For more information about the memory usage of large file uploads in apache2.x + php5.2x, we have found that files are always cached in the memory when php uploads large files. Unlike asp.net, if it is exceeded, it will be written on the disk.
However, I did not find a significant increase in machine memory when using swfupload or traditional Upload.
Does php5 make improvements? Or why?
Sincerely ask for advice
Reply to discussion (solution)
I'm dizzy. what's wrong with this,
Move_uploaded_file ($ file ['tmp _ name'], $ new_file)
Name the temporary file uploaded to the server to the specified directory.
That's what happens after a temporary file is generated...
When this temporary file is generated, it is first stored in the memory, then written at one time, or written in segments. I don't know.
To put it bluntly, uploading 1 GB of files will occupy 1 GB of memory?
From my tests here, it won't take up so much, but the previous articles on the Internet will talk about it again. to ensure the accuracy of this information, I 'd like to ask
You can upload large files and view memory changes (such as imported files) through the task manager ).
Frankly speaking, I didn't find a satisfactory answer. I tried the solution you provided when I posted it.
However, my personal resources are limited and I cannot cover any platform of any version.
This test is not rigorous.