公共/index.php
set_include_path(implode(PATH_SEPARATOR, array(
dirname(dirname(__FILE__)) . '/library',
get_include_path(),
)));
配置/应用程序.ini
includePaths.library = APPLICATION_PATH "/../library"
因此
print get_include_path();
// prints %localpath%/application/../library:%localpath%/library
如果从 ini 中删除 "includePaths.library",./zf (Zend_Tool) 会失败。如果放入 index.php,则引导失败。
如何正确防止这种重复?