0
我使用CHtml :: button與其他動作(無形式)上的「提交」,它顯示頁面,但是當我點擊BACK,然後點擊NEXT時,它顯示文檔已過期「document expired」with button submit on other action
<?php echo CHtml::button('title', array('submit' => array('/'.$_GET['id'].'/smthing/profile'))); //)?>
'文件Expired'表明您已經取得了'POST'請求,然後嘗試瀏覽到同一文件再次使用瀏覽器的導航按鈕(後退,前進)。您應該使用[POST/Redirect/GET](http://en.wikipedia.org/wiki/Post/Redirect/Get)模式來避免這種情況。 – DaveRandom 2012-07-30 09:42:17
@DaveRandom我想使用按鈕像鏈接http://www.yiiframework.com/wiki/48/by-example-chtml/#hh1 – gormit 2012-07-30 09:55:35
你有'
';' – DaveRandom 2012-07-30 10:02:38