如何获得加载视图的值?
$test = $this->load->view('testing',$data);
如何$this->load->view('testing',$data);
将传递的内容放入变量中?
如何获得加载视图的值?
$test = $this->load->view('testing',$data);
如何$this->load->view('testing',$data);
将传递的内容放入变量中?
试试这样......
$test = $this->load->view('testing',$data,true);
整个视图将以$test
字符串形式返回。
如需参考,请通过此链接
http://ellislab.com/codeigniter/user-guide/general/views.html
在上述链接的页面末尾查看
$test = $this->load->view('testing',$data,true);
添加TRUE
为第三个参数:
$test = $this->load->view('testing',$data, TRUE);