Home > Backend Development > PHP Tutorial > 版主大大是在没有招了,麻烦进来看看呐T T

版主大大是在没有招了,麻烦进来看看呐T T

WBOY
Release: 2016-06-13 11:59:17
Original
1087 people have browsed it

版主大大是在没招了,麻烦进来看看呐T T
我做了一个TP框架的查询系统,用I方法获取不到POST数据,$_POST方法获取不到数值。。。可是改成GET方法就能输出到屏幕上。。。thinkPHP论团里搜索好多人都遇到这种问题,可是没有解决方法...求指点!

这是程序部分

<?php<br />namespace Home\Controller;<br />use Think\Controller;<br />class IndexController extends Controller {<br />    public function index(){<br />		$this->display(Mobile);<br />	}<br />    public function tbid(){<br />		/*$TBID=M("tbid");<br />		$data=$TBID->where('id=1')->find();<br />		print_r($data);<br />		echo I(post)."<br>";*/<br />		$this->display(Tbid);	<br />	}<br />	public function see(){<br />			echo "saf";<br />			print_r(I('post.search','kong'));<br />			print_r(I('post.','kong'));<br />			echo $_POST['search'].'asf';<br />		}<br />}<br />
Copy after login

这是页面部分
		<div ><br />        	<form  method="post" action="{:U('see')}"><br />            	<label class="ui-hidden-accessible">许可证编号:</label><br />                <input type="search" name="search"  placeholder="请输入许可证编号..."><br />                <div align="right"><br />               		<input type="submit" name="submit" data-inline="true" value="查询" ><br />                </div><br />            </form> <br />            <div id="content"><br />            	 {tbid_result}<br />            </div><br />        </div>
Copy after login


改成GET就能获得数值。。。POST就是不可以
------解决方案--------------------
xu版大大什么时候都有招
话说直接用I('search')获取就可以了吧,至少我这边一直没出过问题,难道$_POST都是空的??
------解决方案--------------------
I 函数数怎么定义的?
贴出来看看

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template