Forum Moderators: coopster

Message Too Old, No Replies

File Upload Max Size

         

v1nce

11:09 pm on Jan 2, 2007 (gmt 0)

10+ Year Member



Does anybody know how to limit the size of uploaded files. My php.ini setting is set a 2mb, so I would ideally like to throw an error when a user uploads a file larger than this.

coopster

11:51 pm on Jan 2, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hi V1nce, welcome to WebmasterWorld.

You can set the configuration directives and then you can check the error codes during a file upload. The details can be found on the PHP manual page for Handling File Uploads [php.net].