您好,欢迎访问一九零五行业门户网

CI模板中php脚本的使用

今天偶然发现,在ci的模板中能够直接使用ci自带的函数,并且可以直接调用controller里面的属性。案例:
控制器:
public function test(){ $this->a = 'aaa'; $this->load->view('member/test',$data);}
模板:
a);?>
uri->segment(4);?>
输入url:trunk.com/member/index/test/bbb
打印结果:
string 'aaa' (length=3)
http://trunk.com/
ss
其它类似信息

推荐信息