<?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数量中,没有被调用到。
最佳答案