Zend Autoloader not loading Zend classes

General discussion on Zend Studio

Zend Autoloader not loading Zend classes

Postby sara9976 on Fri Dec 08, 2017 9:44 am

I'm using the Zend Framework 2.0 to autoload Zend classes in my application, independent of an MVC framework.

The location of the zend framework, is C:/wamp/library/zendframework/library (contains Zend/Soap etc.)

Below is my code:

Code: Select all
require_once 'Zend/Loader/StandardAutoloader.php';

$loader = new Zend\Loader\StandardAutoloader(array(
'Zend' => 'c:/wamp/library/zendframework/library'));

$loader = new Zend\Loader\StandardAutoloader();
$loader->registerNamespace('Zend', 'c:/wamp/library/zendframework/library');

$auto = new Zend/Soap/Server(null,null);

I'm trying to load the Zend/Soap/Server, but I keep getting the error:

Fatal error: Class 'Zend' not found in C:\wamp\www\Zend_soap\server.php on line 42
whereby on line 42:

$auto = new Zend/Soap/Server(null,null);

Anyone help me on this !

Posts: 1
Joined: Fri Dec 08, 2017 9:36 am

Return to Zend Studio

Who is online

Users browsing this forum: Google [Bot] and 1 guest