On php code, you can use php built in function called ini_get() with parameter of string 'upload_max_size' to get the maximum file size that has been set on php.ini file.
$size = ini_get('upload_max_filesize');
echo $size;
I think the default file size is around 2Mb, you can change it if you want by editing the php.ini file, go to the upload section, and look for 'upload_max_filesize'.
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
You can also find information about maximum upload file size using the phpinfo() function which will generate special page showing all information about your php configuration, including maximum upload file size.
No comments:
Post a Comment