|
|||
|
PHP Code:
Code:
Warning: include_once(IndexController.php) [function.include_once]: failed to open stream: No such file or directory in D:\application\Bootstrap.php on line 5 Warning: include_once() [function.include_once]: Failed opening 'IndexController.php' for inclusion (include_path='.;D:\libraries') in D:\application\Bootstrap.php on line 5 Warning: include_once(IndexController.php) [function.include_once]: failed to open stream: No such file or directory in D:\application\Bootstrap.php on line 5 Warning: include_once() [function.include_once]: Failed opening 'IndexController.php' for inclusion (include_path='.;D:\libraries') in D:\application\Bootstrap.php on line 5 hello world i did not added the controller directory to the include_path, why would i otherwise be setting the controller directory? i am using zend framework 1.0.3, can anyone shed some light on the problem? thanks in advance, a zend forum regular PARTIALLY SOLVED: created an instance of Zend_Controller_Dispatcher_Standard and called the method setControllerDirectory() on the Zend_Controller_Dispatcher_Standard instance and added it as default dispatcher for the front controller $frontController->setDispatcher($dispatcher); well the problem that i now have, is that everything is loaded but the lookup effect is still hanging, so meaning i still get the above warning level error report (e.g. include_once(IndexController.php)) while my controller/action has been processed and the view parsed.. Last edited by ignace : 12-15-2007 at 03:51 PM. |
|
|||
|
If I understand the Docs right your controller path is the path from your includes path
I have this set in my ootstrapper file Code:
set_include_path(dirname(__FILE__) . '/library' . PATH_SEPARATOR . get_include_path()); Code:
/application
/config --holds zf config file
/controllers
/models
/Smarty -- Smarty specific folders
/cache
/config
/templates
/templates_c
/views
/index
/user
/library
/Smarty -- holds all smarty files
/Zend -- holds all zf files
.htaccess
index.php -- bootstrapper file
Code:
/* * Setup the controller */ $front = Zend_Controller_Front::getInstance(); $front->setControllerDirectory(array( 'default' => 'application/controllers', 'blog' => 'modules/blog/controllers', 'news' => 'modules/news/controllers', 'chat' => 'modules/chat/controllers', 'forum' => 'modules/forum/controllers', 'calender' => 'modules/calander/controllers', 'cart' => 'modules/cart/controllers', 'games' => 'modules/games/controllers' )); $front->throwExceptions(true); /* * Run the page and display it GO!!! */ $front->dispatch(); |
|
|||
|
You should not need to set the include path of the controller. The only including i had to do was change the 'include_path' setting for PHP which I did with this code at the beginning of my bootstrap file:
PHP Code:
Use Zend_Loader to load all of your classes, the code looks much more friendly. This is the directory structure I am using: /application /config/library /Zend/public -- This directory is set up as the Web Root .htaccess |
![]() |
| Thread Tools | |
| Display Modes | |
|
|