Zend Framework安装问题

时间:2011-12-12 20:50:23

标签: php windows zend-framework include-path

尝试按照this manual

中的说明设置Zend Framework
$paths = array(
    realpath(dirname(__FILE__) . '/libs/Zend'),
    '.',
);
set_include_path(implode(PATH_SEPARATOR, $paths));
require_once 'Zend/Loader.php';

给出致命错误。 (我的本地网络服务器是IIS。远程的是linux)

本地:

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

远程:

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

但实际上,我发现错误消息中的路径完全正确:D:\Web Server\tural.us\core\serverside\libs\Zend;

enter image description here

2 个答案:

答案 0 :(得分:3)

从路径中移除Zend ......

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

Zend在加载东西时会查找Zend / etc。

答案 1 :(得分:1)

我认为你在include路径中包含/ Zend会导致问题。尝试:

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