简体   繁体   中英

How to pass and retrieve parameters from url in codeigniter?

my url is

http://localhost/helpinghand_web/home/userAutologin?tval=Eo7TIhTJqQnfysn8mwu2nXOQ0yJvY36hprJ99GJH9NBZHTh1LU&page=profile

there are two parameter tval and page how can i get it. following are not working..

$var=$_GET['tval'];
$var=$this->input->get('tval');

use this

$tval = $this->input->get('tval');
$page = $this->input->get('page');

You can use this:

$params = $this->input->get(null, true);

to get all the params passed and then use:

$params['tval']

您可以使用$ tval = $ this-> input-> get('tval')来获取单个数据,而$ tval = $ this-> input-> get()来获取数组格式的singel变量中的所有日期。

 I managed the query you can use it.

If you call www.example.com?tval=1100, it will echo 1100, provided the 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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM