[英]How to pass and retrieve parameters from url in codeigniter?
我的网址是
http://localhost/helpinghand_web/home/userAutologin?tval=Eo7TIhTJqQnfysn8mwu2nXOQ0yJvY36hprJ99GJH9NBZHTh1LU&page=profile
有两个参数tval和page我怎么得到它。 以下不起作用..
$var=$_GET['tval'];
$var=$this->input->get('tval');
用这个
$tval = $this->input->get('tval');
$page = $this->input->get('page');
您可以使用此:
$params = $this->input->get(null, true);
获取所有参数,然后使用:
$params['tval']
您可以使用$ tval = $ this-> input-> get('tval')来获取单个数据,而$ tval = $ this-> input-> get()来获取数组格式的singel变量中的所有日期。
I managed the query you can use it.
如果您致电www.example.com?tval=1100,它将返回1100,前提是该Home
controller is routed correctly.
You can also use the http://ellislab.com/codeigniter%... to get these parameters.
For your query: $this->input->get('tval', TRUE);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.