使用"auto_prepend_file";进入".user.ini" PHP中的文件 [英] Using "auto_prepend_file" into ".user.ini" file in PHP
本文介绍了使用"auto_prepend_file";进入".user.ini" PHP中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在项目的任何页面的运行时加载文件variables.php
(仅包含变量),以便可以在任何地方使用变量.
I want to load the file variables.php
(that simply contains variables) at the run of any pages of my project so I can use the variables from any place.
我创建了一个名为.user.ini
的文件(并将其放置在根文件夹中):
I created a file called .user.ini
(and placed it in the root folder):
; Automatically add files before PHP document.
; http://php.net/auto-prepend-file
auto_prepend_file = /Volumes/www/project_name/admin/libs/variables.php
它不起作用.似乎PHP无法读取.user.ini文件.
It doesn't work. It seems that PHP doesn't read the .user.ini file.
php.ini默认情况下配置正确:
php.ini is right configured by default:
user_ini.cache_ttl 300 300
user_ini.filename .user.ini .user.ini
我在哪里错了?
推荐答案
查看全文