ci 获取参数
直接输入路径http://localhost/ci/index.php/welcome/index/a/99
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
var_dump($_REQUEST);
$this->load->view('welcome_message');
}
}
无法取到参数 什么问题?:L http://localhost/ci/index.php/welcome/index?a=99
这样就可以获得参数 http://codeigniter.org.cn/user_guide/libraries/uri.html 你的 URL 是要通过 $this->uri->segment(URL段) 来获取参数 这样能获取到吗?? 看来你得先看看uri的规则了。
页:
[1]