2010-09-14 168 views
0

我想包括了Zend框架,但我不断收到此错误Zend框架,包括不工作

Warning: require_once(Zend/Json.php) [function.require-once]: failed to open stream: No such file or directory in /usr/www/users/eyelogicy/zone.eyelogic.co.za/weskom/form/classes/ZendFramework/Zend/Json/Decoder.php on line 25 

这里是PHP代码,我使用的包括框架,

set_include_path('classes/ZendFramework' . PATH_SEPARATOR . get_include_path()); 
require_once 'Zend/Json/Decoder.php'; 

任何想法?

Thanx提前!

回答

1

尝试包含路径的绝对路径。

Using absolute path is also a good practise advice

一个平凡的优化可以做,以提高类加载的速度是要仔细注意你的include_path。特别是,你应该做四件事:使用绝对路径(或相对于绝对路径的路径),减少你定义的包含路径的数量,尽可能早地使用你的Zend Framework的include_path,并且只包括当前目录路径你的include_path。