Forum Moderators: coopster
I'm trying to upload a file trough an input box.
You know something like this:
<tr><td>Select the screenie.</td><td><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1200000\" />
<input type=\"file\" name=\"bestand\"></td></tr>
<tr><td> </td><td><input type=\"submit\" name=\"submit\" value=\"" . $text . "\"></td></tr>
</table>
Don't know for certain what tha max_file_size does i'm sort of new to this. Well anyhow i got the thing to upload images and process them.
But when my jpg's get above 500kb i get an error from my move uploaded file script:
// VERPLAATSEN BESTAND
if(!copy($_FILES['bestand']['tmp_name'], $HTTP_SERVER_VARS['DOCUMENT_ROOT']. "/usermade/" .$gamedir . "/images/".$bestandsnaam)) {
echo "Uploading failed. Please click the back button in the browser and try again. This error could be triggered by trying to upload a file bigger then 1 mb.";
exit();
}
Any ideas to what might be causing this?
php.iniconfiguration settings, but your Apache directives as well (LimitRequestBody [httpd.apache.org], etc.)
File uploads can be a bit difficult at first but taking the time to really understand how PHP does things behind the scenes will be a very worthwhile investment of your time.