php - 异常信息:Message: Invalid controller specified (index)

标签 php mysql zend-framework frameworks

我继承了使用zend框架php 1.0网站的维护工作。而且我对这个框架确实没有经验。我更改了页面上的措辞并收到以下错误消息。我知道从哪里开始解决这个问题。

Exception information:Message: Invalid controller specified (index) , 

#0 /usr/local/zend/share/ZendFramework/library/Zend/Controller/Front.php(954): 
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), 
Object(Zend_Controller_Response_Http))#1 /usr/local/zend/share/ZendFramework/library
/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()

#2 /usr/local/zend/share/ZendFramework/library/Zend/Application.php(366): 
Zend_Application_Bootstrap_Bootstrap->run()

#3 /var/www/ispadmin/public/index.php(47): Zend_Application->run()

#4 {main} array: 'module' => string 'agreements' (length=10), 'controller' => string 'index' (length=5), 'action' => string 'index' (length=5)  

请帮忙,伊薇特。

最佳答案

我认为您需要使用方法创建类Agreements_IndexController

公共(public)函数indexAction() { }

并将其放在此处application/modules/agreements/controllers/IndexController.php。并且不要忘记创建 View 文件 application/modules/agreements/views/sctipts/index/index.phtml

通过基本配置应该会有所帮助。

关于php - 异常信息:Message: Invalid controller specified (index),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18497452/

相关文章:

php - Zend Framework 执行缓慢

zend-framework - 如何在Zend Framework中将页眉和页脚包含在布局中?

php - Laravel 项目旁边的 Wordpress 项目(在 public_html 文件夹中)

使用变量的 PHP SQL 更新

javascript - jquery 自动完成,从 mysql 查询传递 JSON 数据

mysql - MYSQL写存储过程的难点

MySQL动态加减行

php - 带有 phpSettings.display_errors 的 zend 模块特定 ini

javascript - 通过 AJAX 使用 jquery 工具包 (jkit) 验证发布表单

javascript - 表单输入(电话号码)到电子邮件