All,
I’m trying to load my Zend framework with the following code:
require_once $themePath.'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata', 'D:\My Documents\xampp\htdocs\wordpress\wp-content\themes\theme');
Zend_Loader::loadClass('Zend_Gdata_HttpClient', 'D:\My Documents\xampp\htdocs\wordpress\wp-content\themes\theme');
Zend_Loader::loadClass('Zend_Json', 'D:\My Documents\xampp\htdocs\wordpress\wp-content\themes\theme');
This gets me part of the way there. However, when it tries to load Zend/Gdata/App.php on the next page it says that it can’t find it. I figured that it would work but I keep getting the following error:
Warning: require_once(Zend/Gdata/App.php) [function.require-once]: failed to open stream: No such file or directory in D:\My Documents\xampp\htdocs\wordpress\wp-content\themes\theme\Zend\Gdata.php on line 27
Line 27 is then:
require_once 'Zend/Gdata/App.php';
Why won’t this work? Thanks for any help in advance!
Try adding the path to where the
Zenddirectory lives to your include path like this:This way, including a file like
Zend/Class.phpwill look in$themePathfor the Zend Framework Files. In the current situation, it can’t locate the Zend files relative to where they were being included from.