gpt4 book ai didi

php - Zend 框架 : Action does not exist

转载 作者:行者123 更新时间:2023-12-02 15:38:51 26 4
gpt4 key购买 nike

这是我的表单生成器函数:

private function getAddArtistForm() {
$form = new Zend_Form();
$form->setAction("saveArtist");
$form->setMethod("post");
$form->setName("addartist");
...
}
public function newAction()
{
$form = $this->getAddArtistForm();
$this->view->form = $form;

}

我还有一个名为 saveArtistAction 的 Action :

public function saveArtistAction() {
...
}

但是当我提交表单时出现以下错误:

Message: Action "saveartist" does not exist and was not trapped in __call() 

请求参数:

array (
'controller' => 'artist',
'action' => 'saveartist',
'module' => 'default',
)

最佳答案

如果用连字符指定 action 会怎么样:

'action' => 'save-artist',

?

关于php - Zend 框架 : Action does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11978926/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com