php - Zend: How to prevent double library in includePath? -
public/index.php
set_include_path(implode(path_separator, array( dirname(dirname(__file__)) . '/library', get_include_path(), )));
configs/application.ini
includepaths.library = application_path "/../library"
as result
print get_include_path(); // prints %localpath%/application/../library:%localpath%/library
if drop "includepaths.library" ini, ./zf (zend_tool) fails. if drop in index.php, bootstraping fails.
how correctly prevent duplicate?
i think you're right include path shouldn't in application.ini well, i'd remove that. zend tool working, think have 2 options:
change setup top answer in question: zend tool include path (which zf find include path). zf's auto discovery changed somewhere along way though i'm not sure if approach still work.
alternatively there environment variable can set give zend tool library location, details here: http://framework.zend.com/manual/1.12/en/zend.tool.framework.clitool.html (see section titled "other setup considerations").
personally skip zend tool - don't think makes things easier.
Comments
Post a Comment