如何获取加载视图的值?
$test = $this->load->view('testing',$data);
如何将$this->load->view('testing',$data);
的内容传递给变量?
答案 0 :(得分:2)
尝试这样.......
$test = $this->load->view('testing',$data,true);
整个视图将以$test
字符串返回。
供参考,请浏览此链接
http://ellislab.com/codeigniter/user-guide/general/views.html
检查上述链接页面的末尾
答案 1 :(得分:1)
添加TRUE
作为第三个参数:
$test = $this->load->view('testing',$data, TRUE);
答案 2 :(得分:1)
$test = $this->load->view('testing',$data,true);