我有一个带有以下路线的 CakePHP 2.3 设置:
Router::connect('/contact', array('controller' => 'old_layout', 'action' => 'contact'));
在我的 AppController 中,我定义
public $components = array(
'Security'...
);
在 OldLayoutController 的 beforeFilter() 函数中,我定义:
$this->Security->allowedControllers = array('OldLayout');
在 old_layout/contact 视图中,我使用 Form->create() 和 end() 函数以及常规 Form::input()... 命令生成表单。
当我在 /contact 提交表单时,我收到以下消息:
The request has been black-holed
Error: The requested address '/[domain].com/contact' was not found on this server.
问题是,我在另一个完美运行的控制器中为另一个表单做同样的事情。