Garayed.com  

Go Back   Garayed.com > PHP
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-16-2008, 05:38 PM
Lawrence Krubner
 
Posts: n/a
Default what does PHP do with temp files uploaded to the server?


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?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-16-2008, 05:58 PM
Iván Sánchez Ortega
 
Posts: n/a
Default Re: what does PHP do with temp files uploaded to the server?

Lawrence Krubner wrote:

> Who is responsible for disposing of the temp files, me or PHP?


Neither: it's the web server the one who handles the upload.

> I'm assuming that either PHP or the server deletes these files after a
> certain amount of time. Is that correct?


AFAIK, it's deleted by the web server whenever the script terminates its
execution.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Bitchee Bitchee Ya Ya Ya - Kitsuné Maison Compilation 5
(2008) - [13] Fuck Friend (CSS remix) (3:14) (0.000000%)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:35 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.