01-13-2009, 08:42 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Oct 2008
Posts: 75
Thanks: 4
|
Using the Zend Loader
I understand that the Zend Loader is to avoid having to use includes/requires all over your page?
I'm having a problem doing that though. This is what a podcast from ZF site said to do:
PHP Code:
<?php
//include paths
ini_set('include_paths', ini_get('include_paths') . PATH_SEPERATOR . '../library');
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('classname');
?>
I don't really want to use the MVC as I don't really like it. I'm just trying to use the loader to avoid doing a whole bunch of requires/includes.
When I use that code I get errors:
Code:
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\Users\9three\Desktop\Server\htdocs\tests\index.php on line 5
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:\Users\9three\Desktop\Server\php\pear\') in C:\Users\9three\Desktop\Server\htdocs\tests\index.php on line 5
The library folder is actually one up. Its in htdocs\library\Zend. So I set it to ../Library and in the require is set to Zend/Loader.php.
All though it all matches im still getting the error. What am I doing wrong?
|
|
|
|