Andrei Posted March 12, 2009 Share Posted March 12, 2009 Hi, I'm using the following code on my site to upload files. It's been working fine until now. I keep getting "Error Msg 2" (see below). What could be causing it? I don't even know where to begin troubleshooting! <?php $target = "/home/folder01/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if ($uploaded_size > 350000000) { echo "Your file is too large.<br>"; $ok=0; } if ($uploaded_type =="text/php") { echo "No PHP files<br>"; $ok=0; } if ($ok==0) { Echo "Error Msg 1"; } else { if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded. <a href=./>Click here</a> to return."; } else { echo "Error Msg 2"; } } ?> Link to comment https://forums.phpfreaks.com/topic/149054-solved-uploading-troubleshooting/ Share on other sites More sharing options...
Andrei Posted March 12, 2009 Author Share Posted March 12, 2009 Problem Solved. Turns out to be a server limit. It was solved by inserting a php.ini file with larger upload limits into the directory. Link to comment https://forums.phpfreaks.com/topic/149054-solved-uploading-troubleshooting/#findComment-782698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.