The Little Guy Posted October 6, 2008 Share Posted October 6, 2008 When you upload a file via PHP, it goes into a temp folder. If I don't use the function "move_uploaded_file", and perform some other type of operation on it, will PHP, or my server automatically delete it after a period of time? Basically how do I get files to be gone from the temp folder (If they don't remove themselves)? Quote Link to comment https://forums.phpfreaks.com/topic/127177-temp-folder/ Share on other sites More sharing options...
AndyB Posted October 6, 2008 Share Posted October 6, 2008 /temp is flushed when the browser session terminates. Quote Link to comment https://forums.phpfreaks.com/topic/127177-temp-folder/#findComment-657863 Share on other sites More sharing options...
The Little Guy Posted October 6, 2008 Author Share Posted October 6, 2008 OK. So it just deletes all of the current users uploaded files... Quote Link to comment https://forums.phpfreaks.com/topic/127177-temp-folder/#findComment-657864 Share on other sites More sharing options...
The Little Guy Posted October 6, 2008 Author Share Posted October 6, 2008 Another thing, since I want users to upload videos, would it be best to have the videos uploaded and converted to FLV ASAP, and moved to a permanent location, or uploaded to a "non-flushed" directory, then have a cron job that runs every 10 minutes to check for new uploads, which would then convert them to FLV then delete the original video? Quote Link to comment https://forums.phpfreaks.com/topic/127177-temp-folder/#findComment-657871 Share on other sites More sharing options...
corbin Posted October 6, 2008 Share Posted October 6, 2008 If your CPU is inactive during those 10 minutes (inactive meaning not maxed out in this context), why not use it? If you do it every 10 minutes you run the risk of it freezing your server or it overlapping with another run later. Then again, if it maxes the CPU out when you're uploading as your processing, you're going to have problems too.... Quote Link to comment https://forums.phpfreaks.com/topic/127177-temp-folder/#findComment-657895 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.