0
我有下面的代碼在我的應用程序創建一個表單:CakePHP的編輯表單鏈接中斷路由
<?php echo $this->Form->create('User', array('action'=>'edit')); ?>
,它具有類似於路線:
Router::connect('/settings', array('controller'=>'users','action'=>'edit'));
不過的動作是錯誤的.. 。
<form action="https://stackoverflow.com/users/edit/6" method="post" accept-charset="utf-8">
如果我把形式與默認:
<?php echo $this->Form->create(); ?>
然後它修復了路由問題,但爲什麼指定參數會破壞路由?