[英]php.ini to affect all sub-folders
I need to add a php.ini in a specific folder in my server to set allow_url_fopen = true
for a website. 我需要在服务器的特定文件夹中添加php.ini,以为网站设置allow_url_fopen = true
。 The website has its root folder an plenty of sub-folders that also have many sub-folders. 该网站的根文件夹中包含许多子文件夹,也有许多子文件夹。
If I place the php.ini in the root of the website, it seems to only affect that folder (I've run phpconfig() there and in the subfolders. 如果我将php.ini放置在网站的根目录中,则似乎只影响该文件夹(我在该文件夹及其子文件夹中运行phpconfig())。
Is it possible to make it somehow that affects all the subfolders without having to palce uno php.ini per sub-folder? 是否有可能使它以某种方式影响所有子文件夹,而不必在每个子文件夹中放置php.ini?
Regarding Mario's comment, I tried both php.ini
and .user.ini
. 关于Mario的评论,我尝试了php.ini
和.user.ini
。 As he said php.ini
is not recursive, but .user.ini
is working recursively for me. 正如他所说, php.ini
不是递归的,但是.user.ini
正在为我递归工作。 I am also on 1and1 shared linux hosting with PHP5 as well. 我也使用PHP5在1and1共享Linux托管上。 I just put the .user.ini
in my root directory. 我只是将.user.ini
放在我的根目录中。
您可以在.htaccess中设置PHP配置选项。
php_flag allow_url_fopen on
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.