3

我试图在服务器范围内包含多个文件,所以etc/php.ini我有几行:

;Blowfish password
auto_prepend_file="/plugins/phpass-0.3/PasswordHash.php"

;WhoIs lookup
auto_prepend_file="/plugins/phpwhois-4.2.2/whois.main.php"

;IP database
;auto_prepend_file="/plugins/GeoIP/geoip.inc"
auto_prepend_file="/plugins/GeoIP/geoipcity.inc"

似乎只有最后一个auto_prepend_file被接受,或者它正在覆盖其他。

如何包含多个文件?

4

1 回答 1

4

创建一个单独的加载器文件,它需要您需要的文件,然后添加该文件。

auto_prepend_file="/path/to/loader.php"

在 loader.php 中:

require '/plugins/phpass-0.3/PasswordHash.php';
require '/plugins/phpwhois-4.2.2/whois.main.php';
require '/plugins/GeoIP/geoipcity.inc';
于 2012-08-21T20:38:02.090 回答