CI超级对象中的input输入类

$this->input

  是CI_Input类的实例system/core/Input.php

  CI_Input类提供的方法:

  $this->input->post('username');//$_POST['username'];

  $this->input->server('DOCUMENT_ROOT');//$_SERVER['DOCUMENT_ROOT'];

 

  在视图中,直接用$this来访问超级对象的属性

    <?php echo $this->input->server('DOCUMENT_ROOT');?>

 

  

 

  

posted on 2015-03-18 22:12  ziyi_ang  阅读(125)  评论(0编辑  收藏  举报

导航