Autoloading Zend Framework classes

徘徊边缘 提交于 2019-12-05 20:12:03

You need to include the Zend Framework "library" on your include path. You can either do this globally in your php.ini file's include_path directive or more simply in your application's index.php file, eg

set_include_path(implode(PATH_SEPARATOR, array(
    '/path/to/zend/framework/library',
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path()
)));

If it's a standard ZF app, there will probably already be something like that in index.php, just add the ZF path to the array.

If you do make any changes to your php.ini file, don't forget to restart Apache.

I think the message is telling you it can't find the needed files.

Have you added Zend library to your include path as recommended in the docs?

realpath(APPLICATION_PATH . '/../../php/ZendFramework/library')

Things don't happen by magic. You have to provide the correct include_path. From what I see (C:\xampp\htdocs\sandbox\public\index.php) you have to go two directories back to C:\xampp and then up again into your library.

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