Php IndexController新添加的方法给出404错误
我是zf的新手,所以我想这对你们来说是一个基本的问题。我有一个zf1 project,我正在研究代码。在我的IndexController中,除了我的新方法外,所有旧方法都正常工作,这给了我一个404错误。我需要在任何地方指定方法名称吗?或者我能为这个错误做些什么 我的控制器路径-application/modules/default/controllers/IndexController.phpPhp IndexController新添加的方法给出404错误,php,zend-framework,Php,Zend Framework,我是zf的新手,所以我想这对你们来说是一个基本的问题。我有一个zf1 project,我正在研究代码。在我的IndexController中,除了我的新方法外,所有旧方法都正常工作,这给了我一个404错误。我需要在任何地方指定方法名称吗?或者我能为这个错误做些什么 我的控制器路径-application/modules/default/controllers/IndexController.php public function mytestAction() { } publ
public function mytestAction() { }
public function termsconditionsAction() { }
我新添加的方法在IndexController.php中不起作用
public function mytestAction() { }
public function termsconditionsAction() { }
在IndexController.php中工作的旧方法
public function mytestAction() { }
public function termsconditionsAction() { }
视图路径-应用程序/modules/default/views/scripts/index/mytest.phtml您使用什么url访问它?@fauad这是工作url这不是工作url!它应该会起作用。可能是你把它放错地方了。检查大括号。不,只是添加方法和相应的视图文件。没有异常显示只给出404错误。它没有执行我的函数。