我希望我的Apacheconfiguration中的一个特定的虚拟主机覆盖auto_prepend
PHPconfiguration指令,并始终包含一个PHP文件,没有包括它的其他网站。
一种select是在Apache中使用SetEnv
,在PHP中使用getenv
,在php.ini中使用auto_prepend
未经testing,但我会尝试添加
php_value auto_prepend_file /your/path/here.php
到你的虚拟主机configuration。 根据PHP文档 ,这种方法只有在PHP作为Apache 模块运行时才有效。