An error occurred while getting started with ZendFramework.

Source: Internet
Author: User
An error occurred while getting started with ZendFramework. do you know anyone has read PHPWEB2.0 development practices? The code in this book is always incorrect in my windows system. here is the code & lt ;? Require_once & quot; Zend/Loader. php & quot; Zend_Loader: registerAutoload (); $ config = error when getting started with ZendFramework
I wonder if anyone has seen PHPWEB2.0 development practices? The code in this book is always wrong in my windows system.
The code is here
Require_once "Zend/Loader. php ";
Zend_Loader: registerAutoload ();

$ Config = new Zend_Config_Ini ('../settings. ini', 'development ');
Zend_Registry: set ('config', $ config );

// Connect to the database
$ Params = array ('host' => $ config-> database-> hostname,
'Username' => $ config-> database-> username,
'Password' => $ config-> database-> password,
'Dbname' => $ config-> database );

$ Db = Zend_Db: factory ($ config-> database-> type, $ params );
Zend_Registry: set ('DB', '$ db ');
$ Db-> query ('select 1 ');

// Handle the user requerst
$ Controller = Zend_Controller_Front: getInstance ();
$ Controller-> setControllerDirectory ($ config-> paths-> base. "/include/Controllers ");
$ Controller-> dispatch (null, null );
?>

The error message is as follows:

Fatal error: Uncaught exception 'zend _ Controller_Dispatcher_Exception 'with message 'invalid controller specified (error)' in D: \ PHPnow-1.5.4 \ include \ Zend \ Controller \ Dispatcher \ Standard. php: 194 Stack trace: #0 D: \ PHPnow-1.5.4 \ include \ Zend \ Controller \ Front. php (920): Zend_Controller_Dispatcher_Standard-> dispatch (Object (Zend_Controller_Request_Http), Object (Zend_Controller_Response_Http) #1 D: \ PHPnow-1.5.4 \ htdocs \ index. php (24): Zend_Controller_Front-> dispatch (NULL, NULL) #2 {main} thrown in D: \ PHPnow-1.5.4 \ include \ Zend \ Controller \ Dispatcher \ Standard. php on line 194


I have read the error code at the location of the 194 rows, which is written as follows:
Throw new Zend_Controller_Dispatcher_Exception ('invalid controller specified ('. $ request-> getControllerName ().')');


I just got a little confused about zend framework. I hope the cool guys can solve this problem ....

------ Solution --------------------
Bytes
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.