While uploading a 2.4MB file of type JPG, am getting a output as - $_FILES['snap1']['size'] : 0 $_FILES['snap1']['type'] : #_FILES['snap1']['error'] : (The uploaded file exceeds the upload_max_filesize directive in php.ini) Can anyone please explain this error to me and also help me fix this error????
Check your config file? ... And change maximum size allowed. You could also change it within the PHP script.
i might sound stupid but i didn't get anything u said... configration file??? how can i change it within my php script??
Use phpinfo() and look for "Loaded Configuration File". That would be your configuration file. To change it in run time, set it to something like: ini_set('upload_max_filesize', '5M'); Code (markup): That's 5MB
Do you know some basics of PHP or are you an absolute beginner. If you know what a config.ini file is, then you should open that file and change the value of upload_max_filesize directive to a value greater than 2.4MB