Reputation: 1065
I've an application in my Apache local Server and using Yii2-advanced-app. I need to edit my php.ini to support my project, I need to change precision=14
become precision=20
. I'm affraid that change will affect all application in my local server. I've read some issue, and they said I can add ini_set('precision', '20');
in my current application, so that change will only affect the current application.
In some issue they said in Yii2-basic-app you can add that in web.php
, under use
statement. I think that file in Yii2-advanced-app equal to /config/main.php
. I didn't found any use
statement there, and I also have add the ini_set
in there and I got nothing.
ini_set
code in my current application?Upvotes: 1
Views: 2393
Reputation: 6726
The easiest way is to use '.user.ini' in your public directory.
Example of .user.ini:
precision = 20
memory_limit = 768M
post_max_size = 68M
Upvotes: 2