views:

25

answers:

1

Hi guys, I am trying to include the Zend framework, but I keep getting this error,

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

here is the PHP code I am using to include the framework,

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

Any ideas?

Thanx in advance!

+1  A: 

Try an absolute path for the include path.

Using absolute path is also a good practise advice:

One trivial optimization you can do to increase the speed of class loading is to pay careful attention to your include_path. In particular, you should do four things: use absolute paths (or paths relative to absolute paths), reduce the number of include paths you define, have your Zend Framework include_path as early as possible, and only include the current directory path at the end of your include_path.

Gordon