New to Zend!!
I have created a Zend projects with 2 modules, 1.defaule and 2.test
Structure
application + |__ Modules | _default controllers IndexController.php ErrorController.php
models views | _test controllers IndexController.php models views
application.ini
[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = "test"
Finally in my test/controllers/IndexController.php
class Test_IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
echo "This is Test Index Controller";
}
}
I can access default module with no problems, but when I try
dev.local/test/index
It says Application Error
Any Suggestions why its doing this??
First make
resources.frontController.params.displayExceptions = 1
It will give you the exact error message in the controller, and whats in your views directory in your test module? You need to have a script template file for index action. Just guessing, coz faced similar issue recently.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.