我做了一个TP框架的查询系统,用I方法获取不到POST数据,$_POST方法获取不到数值。。。可是改成GET方法就能输出到屏幕上。。。thinkPHP论团里搜索好多人都遇到这种问题,可是没有解决方法...求指点!
这是程序部分
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
$this->display(Mobile);
}
public function tbid(){
/*$TBID=M("tbid");
$data=$TBID->where('id=1')->find();
print_r($data);
echo I(post)."<br>";*/
$this->display(Tbid);
}
public function see(){
echo "saf";
print_r(I('post.search','kong'));
print_r(I('post.','kong'));
echo $_POST['search'].'asf';
}
}
这是页面部分
<div >
<form method="post" action="{:U('see')}">
<label class="ui-hidden-accessible">许可证编号:</label>
<input type="search" name="search" placeholder="请输入许可证编号...">
<div align="right">
<input type="submit" name="submit" data-inline="true" value="查询" >
</div>
</form>
<div id="content">
{tbid_result}
</div>
</div>
改成GET就能获得数值。。。POST就是不可以
------解决方案--------------------

话说直接用I('search')获取就可以了吧,至少我这边一直没出过问题,难道$_POST都是空的??
------解决方案--------------------
I 函数数怎么定义的?
贴出来看看