$This->input->get()获取不了数据?
/controllers/validate_code.phpclass Validate_code extends Controller {
function Validate_code()
{
parent::Controller();
}
function index(){
$this->load->helper("validate_code");
$validateImg = new DK_Validate_code();
$validateImg->makeValidateImg();
}
function test(){
echo $this->input->get('name');
exit;
}
}
用URL :http://127.0.0.1:81/ftjob/index.php/validate_code/test/name/444
$this->input->get('name');为何获取不了name值 -_-
http://127.0.0.1:81/ftjob/index.php/validate_code/test/name/444
这里没有 get,get 是
http://127.0.0.1:81/ftjob/index.php?a=b&c=d
中的 a 和 c
要打开 CI 的 GET 请参考论坛 FAQ 置顶帖。 $name=$this->uri->segment(4);
参考http://codeigniter.org.cn/user_guide/general/urls.html 谢谢 楼上两位
页:
[1]