Reputation: 1176
is there any limit when using the file attribute in html to upload file (then later move_uploaded_file() in php to transfer them)? obviously ridicoulous file sizes wouldnt work, but iv heard somewhere that there is a 2mb size limit. is this true?
Upvotes: 1
Views: 444
Reputation: 1894
yes, this is true in php 2M is the deafult file upload limit if u wnat to extend it than go to php.ini file and change
upload_max_filesize = 2M
To
upload_max_filesize = nM
n can be your required limit number.
Reference: core php.ini directives
Upvotes: 0
Reputation: 32484
File upload size is not generally restricted on the client side, and even if it is there are some clients who will ignore this. It is the server side implementation that governs file size restrictions in the majority of cases. As such in the case of php this is governed by the post_max_size
value of the php.ini
file. So there is technically no limit ( as you can set this to be any value ).
Upvotes: 2
Reputation: 1917
Yes. Though PHP presents a very versatile and user friendly interface for handling file uploads, the default installation is not geared for working with files in excess of 2 Mega Bytes.
But you can change it using
php.ini
file upto 25MB
You can call the phpinfo() function to find the location of your php.ini file, it will also tell you the current values for the following settings that we need to modify
Upvotes: 0