darkcarnival Posted April 1, 2007 Share Posted April 1, 2007 hi, i have a quick question with file uploading. i'm testing around with it and decided to see how php will handle the 2M limit set by my php.ini file for some reason whenever the file size is way over the 2M limit i get a notice error, but if its just a few megs off i get the normal error i set. i tried several file types and sizes to make sure it wasnt a code-related issue but if you still want some code i'm willing to post it o request. basically my question is, how can i make it it display the error message i have set instead of a notice error? thanks Quote Link to comment https://forums.phpfreaks.com/topic/45138-file-upload-question/ Share on other sites More sharing options...
Schlo_50 Posted April 1, 2007 Share Posted April 1, 2007 if ($sizelimit_change this){ echo( "Upload Successful!" ); else { echo( "File too large!" ); or php code on this line or die ( "File too Large!" ); That might work, im a noob too though so i may be wrong. Quote Link to comment https://forums.phpfreaks.com/topic/45138-file-upload-question/#findComment-219112 Share on other sites More sharing options...
darkcarnival Posted April 1, 2007 Author Share Posted April 1, 2007 well the thing is, i wish to have the file size limit be determined by what the php.ini settings already have setup, is that a poor idea to do that? Quote Link to comment https://forums.phpfreaks.com/topic/45138-file-upload-question/#findComment-219114 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.