0

Hi Daniwebteam,

I want to upload a file size which is greater than 2 MB.The default file size of php is 2MB.
So,i have used the following coding,

ini_set('upload_max_filesize','7M');

or
ini_set('upload_max_filesize','7000');


But still i did not able to upload a file size which is greater than 2mb.When i change the settings of ini.php file max_upload_filesize to 7MB then its fine.But i do not want to change the settings in ini.php file.I want to change the setting to my application only.Is there any steps to change this settings.


Thank you,

With Regards,
Prem

5
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by BanneyHill
0

It's possible that it has been disabled. There are two other approaches that you can use to make a local change without making it global:

You may be able to use a local php.ini file in the same directory as the program doing the upload (I can do this on my virtual server).

You can use a .htaccess file:
php_value post_max_size 7M
php_value upload_max_filesize 7M

0

Thank for your reply,

How to use a .htaccess file.I do no about this htaccess file.


With Regards,
Prem

0

Hey,

Just create a file named .htaccess i your current file's root folder and place the code mentioned by chrishea in it.
Simple....

Edited by Manuz: n/a

0

First of All, thank you very much that you shared with us. I don't have enough information how to upload the image or videos.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.