Tuesday, April 16, 2013

PHP Disable File Upload

Open php.ini file and find the file_uploads directive. It should look something like this:
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

To disable file uploads in php set the directive to Off:
file_uploads = Off

Restart apache with the following command
service apache2 restart

Note: In Ubuntu php.ini file can be found udner: /etc/php5/apache2

No comments:

Post a Comment