Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Lawrence Krubner
June 16, 2008, 5:38 pm
rate this thread
Imagine I have a site where users can upload files. Now imagine we are
enfocing a 100 meg limit on each account. The user uploads a file, the
code checks to see if they are already over their limit. If not, the PHP
upload code precedes as normal and I use move_uploaded_file() to copy
the temp file to its permanent home. But if the user is over their
limit, then I do not use move_uploaded_file(). I simply notify the user
that they are over their limit and not allowed to upload any more files.
Who is responsible for disposing of the temp files, me or PHP? I'm
assuming that either PHP or the server deletes these files after a
certain amount of time. Is that correct?
June 16, 2008, 5:58 pm
Re: what does PHP do with temp files uploaded to the server?
Lawrence Krubner wrote:
Neither: it's the web server the one who handles the upload.
AFAIK, it's deleted by the web server whenever the script terminates its
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Now listening to: Bitchee Bitchee Ya Ya Ya - Kitsuné Maison Compilation 5
(2008) -  Fuck Friend (CSS remix) (3:14) (0.000000%)