覆盖全局php.ini文件 [英] Overriding global php.ini file
问题描述
由于我在共享主机上运行应用程序,因此我无法访问全局php.ini文件,现在发生的事情是我需要将php.ini文件放在每个目录中才能使用设置.但是我想知道是否有一种方法可以覆盖我的根目录中每个子文件夹的全局php.ini文件,而不是将php.ini文件放在每个文件夹中,这对于以后的情况不是一个好习惯.
I don't have access to global php.ini file since I am running my application on shared hosting and now what happens is I need to put my php.ini file in every directory to use the settings. But I am wondering whether there is a way to override the global php.ini file in my root directory for every sub folders instead of putting the php.ini file inside of every and each folder which isn't a good practice for further times.
如果您要问我需要更改哪个特定选项,请选择auto_prepend_file
If you are asking which specific option I need to change is auto_prepend_file
推荐答案
是的!并非可以设置所有php.ini选项,但是可以通过.htaccess文件或ini_set
函数等更改许多选项.请参见页面.
Yes! Not all php.ini options can be set, but many can be changed through .htaccess files, or the ini_set
function, etc. See these pages.
这篇关于覆盖全局php.ini文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!