1
我試圖建立Zend框架上的獅子,我在在Lion上設置Zend Framework路徑?
/usr/local/zend/share/ZendFramework/library/Zend
我的PHP的路徑是安裝了 「Zend公司」(php -i | grep include_path
):
include_path => .: => .:
我試圖做的:
<?php
set_include_path('ZendFramework-1.10.3-minimal/library/'.get_include_path());
require_once('Zend/Loader.php');
Zend_Loader::registerAutoload();
?>
我在瀏覽器中看到的是:
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /Users/ngoles/Programming/WWW/ApparelDream/appareldream/test.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='ZendFramework-1.10.3-minimal/library/.:') in /Users/ngoles/Programming/WWW/ApparelDream/appareldream/test.php on line 3
正確設置路徑的建議?
您的自動加載方法從ZF 1.8開始已棄用。使用'require_once'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader :: getInstance();'而是。 – nevvermind 2011-12-24 08:22:35