I have a website hosted on a PC I have no access to. I have an upload form allowing people to upload files up to 30MB big. My server side script is done in PHP..then how can i set size limit in php ?
1
votes
5 Answers
1
votes
0
votes
Getting File Size in PHP is done in the following way
$filesize = $_FILES['file']['size'];
Here you can get the file size and can check for the size to be limited to
if($filesize<yourmaxsize)
{
//do something
}
If you want file size of 30MB to be uploadable then There is some thing called as maximum size that can be uploaded generally it will be 2MB i think you can go to php.ini (configuration file) and change its size to 30MB or 50MB whatever the size you want
0
votes
0
votes