m/c/a在form表单里post提交时报错

浏览:748 发布日期:2015/03/27 分类:求助交流 关键字: post
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $this->display();
    }
    public function show(){
        dump(__APP__);
        echo 'show1';
    }
    public function updata(){
        echo 'updata1';
    }
}
public function index(){
        $this->display();
    }
    public function show(){
        echo 'showimg';
    }
    public function updateimg(){
        echo 'updateimg';
    }
<form action="index.php" method="post">2
<!--隐藏元素-->
<input type="hidden" name="m" value="Home" />
<input type="hidden" name="c" value="Index" />
<input type="hidden" name="a" value="updata" />
<input type="hidden" name="id" value="123" />
<!--隐藏元素-->
<input type="submit" class="button" value="44" />
<input type="reset" class="button" value="55" />
</form>
<br/>
<br/>
<br/>
<br/>
<form action="index.php" method="post">2
<!--隐藏元素-->
<input type="hidden" name="m" value="Home" />
<input type="hidden" name="c" value="IndexImage" />
<input type="hidden" name="a" value="show" />
<input type="hidden" name="id" value="123" />
<!--隐藏元素-->
<input type="submit" class="button" value="44" />
<input type="reset" class="button" value="55" />
</form>
----------------------
两次提交显示结果都是
IndexController中的方法内容;
第二个表单c/a/(IndexImage)在hidden数量中,没有被调用到。
最佳答案
评论( 相关
后面还有条评论,点击查看>>