从窗体调用了错误的控制器。Cakephp
有一张表格。 $this->Form->create(数组('controller'=>'bookings','action'=>'book') 但出于某种原因,它搜索的不是BookingsController,而是RoomsController 指定的操作。 请帮忙。使用Cakephp 2.3TLDR:从窗体调用了错误的控制器。Cakephp,cakephp,Cakephp,有一张表格。 $this->Form->create(数组('controller'=>'bookings','action'=>'book') 但出于某种原因,它搜索的不是BookingsController,而是RoomsController 指定的操作。 请帮忙。使用Cakephp 2.3TLDR: echo $this->Form->create( 'Booking', //notice this - the first item array(
echo $this->Form->create(
'Booking', //notice this - the first item
array(
'url' => array(
'controller'=>'bookings',
'action'=>'book'
)
)
);
说明:
echo $this->Form->create(
'Booking', //notice this - the first item
array(
'url' => array(
'controller'=>'bookings',
'action'=>'book'
)
)
);
查看文档而不是仅仅猜测其语法可能是一个好主意:
:)