1

getメソッドのあるフォームがあります。送信すると、クエリ文字列はURLの後に表示されますか?マーク。しかし、私はそれをURLのようにzendにしたい

From:controller / action?param = value to:controller / action / param / value

JavaScriptを使用してリダイレクトする必要がありますか?または、その仕事をするヘルパー関数zendを作成しますか?そのためのより良い解決策はありますか?

乾杯

4

1 に答える 1

0

それはあなたの行動次第です。フォームアクションが次のようであるとします'somecontroller/test'

Public function testAction(){
//codes

//You must be redirecting like this
$this->_redirect('/anothercontroller/fooaction?param=value');

//You can change that to
$this->_redirect('/anothercontroller/fooaction/param/value');

}

そのfooactionでその値を取得できるように

 $this->_request->getParam('param');
于 2012-05-04T11:52:21.710 に答える