Zend Framework setup issue

有些话、适合烂在心里 提交于 2019-12-11 20:26:53

问题


Trying to setup Zend Framework as instructed in this manual

$paths = array(
    realpath(dirname(__FILE__) . '/libs/Zend'),
    '.',
);
set_include_path(implode(PATH_SEPARATOR, $paths));
require_once 'Zend/Loader.php';

Gives fatal error. (My local webserver is IIS. Remote one is linux)

Local:

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='D:\Web Server\tural.us\core\serverside\libs\Zend;.') in D:\Web Server\tural.us\core\content\pages\utube.php on line 2

Remote:

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='/home/tural/public_html/core/serverside/libs/Zend:.') in /home/tural/public_html/core/content/pages/utube.php on line 2

But in fact, I see that the path in error message is totally right : D:\Web Server\tural.us\core\serverside\libs\Zend;


回答1:


Remove Zend from the path...

realpath(dirname(__FILE__) . '/libs/')

Zend looks for Zend/etc whenever it loads stuff.




回答2:


I think your inclusion of /Zend in the include path is causing the problem. Try:

$paths = array(
    realpath(dirname(__FILE__) . '/libs'),
    '.',
);


来源:https://stackoverflow.com/questions/8480633/zend-framework-setup-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!