【发布时间】:2010-07-24 20:19:04
【问题描述】:
我看过几个例子,但我似乎无法让它发挥作用。
配置.php:
$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;
图书馆:
class MY_Input extends CI_Input
{
function _sanitize_globals()
{
$this->allow_get_array = TRUE;
parent::_sanitize_globals();
}
}
控制器:
$this->load->library('MY_Input');
..................
$sid=$this->input->get('sid',TRUE);
$name=$this->input->get('name',TRUE);
$campid=$this->input->get('campid',TRUE);
$rate=$this->input->get('rate',TRUE);
$status=$this->input->get('status',TRUE);
这是网址:
www.mysite.com/memb/index/postback.php?campid=23552342&name=mcamp&rate=15&sid=42&status=1&ip=198152999000
发生的情况是,它只是进入我的主页,没有更新数据库,也没有进入我在控制器中添加的测试视图页面,只是为了查看是否会加载视图。
编辑:现在看来,如果我尝试加载其他视图,我总是以主视图结束...
【问题讨论】:
标签: php codeigniter get