Php 科哈纳3.3请求->;post()没有数据

Php 科哈纳3.3请求->;post()没有数据,php,request,kohana,twig,kohana-3.3,Php,Request,Kohana,Twig,Kohana 3.3,我对Kohana 3.3有问题。我无法在控制器上使用$this->request->POST()获取$u POST值。我不知道我在代码上做错了什么。希望你能帮我。顺便说一句,我可以使用Kohana 3.3在所有模板上使用Twig,但我无法处理表单中的数据。谢谢。:-) 这是我的密码: 控制器: class Controller_Setup extends Controller{ public function action_item_group(){ if (HTTP

我对Kohana 3.3有问题。我无法在控制器上使用$this->request->POST()获取$u POST值。我不知道我在代码上做错了什么。希望你能帮我。顺便说一句,我可以使用Kohana 3.3在所有模板上使用Twig,但我无法处理表单中的数据。谢谢。:-)

这是我的密码:

控制器:

class Controller_Setup extends Controller{
     public function action_item_group(){
         if (HTTP_Request::POST == $this->request->method()){
                // Post has no data
                print_r($this->request->post());

         }
         $this->response->body( Twig::factory('setup/sample_form') );
     }
}
查看

<form class="form-horizontal" action="item_group" method="post" name="setup_form">
 <input type="text" value="">
 <button type="submit">Save</button>
</form>

拯救

您需要为HTML元素设置
name
id
属性。请尝试此代码,看看它现在是否正常工作:

<form class="form-horizontal" action="item_group" method="post" name="setup_form">
 <input name="group_name" type="text" value="">
 <button type="submit">Save</button>
</form>

拯救

您需要为HTML元素设置
name
id
属性。请尝试此代码,看看它现在是否正常工作:

<form class="form-horizontal" action="item_group" method="post" name="setup_form">
 <input name="group_name" type="text" value="">
 <button type="submit">Save</button>
</form>

拯救