Max file size to upload in Codeigniter

4k views Asked by At

I am stuck with file uploading. I set 500M in PHP, but still there is a limit of 5M. It is limited by $this->max_size (library upload.php). I don't get it. How can it be set?

1

There are 1 answers

0
Madhuri Patel On

There are three different places where you have to update:

1) php.ini

2) .htaccess

3) in your file where you want update max_upload_size

In php.ini file, you have to update this:

ini_set('upload_max_filesize', '200M');  
ini_set('post_max_size', '200M');  

In .htaccess, you have update below:

php_value upload_max_filesize 128M  
php_value post_max_size 128M  

And last in your file, you have to add this line:

$config['max_size'] = '1000000';