Zend Framework Configuration Issues
PHP Code
Error_reporting (e_all| E_STRICT); Ini_set (' display_errors ', 1); Date_default_timezone_set (' Asia/shanghai '); Directory settings and class loading Set_include_path ('. '). Path_separator. '.. /library/'. Path_separator. '.. /application/models/'. Path_separator. '.. /application/controllers/'. Path_separator. '.. /application/views/'. Path_separator. Get_include_path ()); Include "zend/loader/autoloader.php"; Zend_loader_autoloader::getinstance ()->setfallbackautoloader (true); Load configuration file $config=new Zend_config_ini ('.. /application/config.ini ', ' General '); $registry =zend_registry::getinstance (); $registry->set (' config ', $config) ;//Set Database $db=zend_db::factory ($config->db); Zend_db_table::setdefaultadapter ($DB);//Set Controller $frontcontroller = Zend_controller_front::getinstance (); $frontController->setbaseurl (' f:/php/source/booksystem/booksystem/html '); $frontController Throwexceptions (TRUE); $frontController->setcontrollerdirectory ('.. /application/controllers '); ZEND_LAYOUT::STARTMVC (Array (' layoutpath ' => '. /application/layouts ')); run! $frontController->dispatch ();
The above code: always prompt for errors:
Fatal error:uncaught exception ' zend_controller_dispatcher_exception ' with message ' Invalid Controller specified (Index . php) ' in f:\php\source\booksystem\booksystem\library\zend\controller\dispatcher\standard.php:248 Stack trace: #0 F : \php\source\booksystem\booksystem\library\zend\controller\front.php (955): zend_controller_dispatcher_standard- >dispatch (Object (Zend_controller_request_http), Object (zend_controller_response_http)) #1 F:\PHP\Source\ booksystem\booksystem\html\index.php: Zend_controller_front->dispatch () #2 {main} thrown in F:\PHP\Source\ booksystem\booksystem\library\zend\controller\dispatcher\standard.php on line 248
I beg you heroes!
------Solution--------------------
This configuration is too backward for you.
I do not know what version of you, if it is more than 1.10, you can go to the official website to download a quily start. It's directly generic.