jtrost Posted June 2, 2007 Share Posted June 2, 2007 Hi. I've created a simple file uploading script, which works perfectly. Here's the script: if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; move_uploaded_file($_FILES["file"]["tmp_name"],"images/comprofiler/".$id.".swf"); echo "Stored in: images/comprofiler/".$id.".swf"; } However the files are about 40mb in size, which takes a LONG time to upload. Is there a way I can put these files in a quere and upload them so the user doesn't have to sit and wait for it to upload? Quote Link to comment https://forums.phpfreaks.com/topic/54036-uploading-large-files/ Share on other sites More sharing options...
breath18 Posted June 3, 2007 Share Posted June 3, 2007 if you use a exec command it will then run in a so called seperate thread. http://us2.php.net/function.exec thats what i would give a try, i BELIEVE this could help you out. Quote Link to comment https://forums.phpfreaks.com/topic/54036-uploading-large-files/#findComment-267304 Share on other sites More sharing options...
tail Posted June 3, 2007 Share Posted June 3, 2007 exec executes an external program... Quote Link to comment https://forums.phpfreaks.com/topic/54036-uploading-large-files/#findComment-267322 Share on other sites More sharing options...
jtrost Posted June 4, 2007 Author Share Posted June 4, 2007 So could I use exec to run a batch file that will FTP into my server and upload the file? Quote Link to comment https://forums.phpfreaks.com/topic/54036-uploading-large-files/#findComment-267912 Share on other sites More sharing options...
breath18 Posted June 5, 2007 Share Posted June 5, 2007 that could work, tho i dont know if it would move on, it might still wait for the exec to finish, i dont believe it would but i do not know for 100% sorry i can not be of more help. Quote Link to comment https://forums.phpfreaks.com/topic/54036-uploading-large-files/#findComment-268073 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.