What is standard size to upload an image.When user are uploading a large image to my website upload time error is occurring.I am resizing image at the time of uploading also.I want to modify my code as if large image will go to upload then image upload should not occur. So what is standard size of image to upload on server for any website ? So that way i will fix my code. Thanks in advance
You can try changing the script time limit in the php.ini, so your script doesn't timeout. There is no way to check the file size before uploading with php (because its serverside) or javascript (would cause a major security hole). You can limit the file size in php, but that wouldn't fix your timeout issue since it checks the file size once it's already uploaded.
yes, you need to edit the php.ini using : void set_time_limit ( int $seconds ) Code (markup): and you also need the memory setting and also maximum uploaded byte * upload_max_filesize = 10M * post_max_size = 20M Code (markup):