0

如何获得加载视图的值?

$test = $this->load->view('testing',$data);

如何$this->load->view('testing',$data);将传递的内容放入变量中?

4

3 回答 3

2

试试这样......

$test = $this->load->view('testing',$data,true);

整个视图将以$test字符串形式返回。

如需参考,请通过此链接

http://ellislab.com/codeigniter/user-guide/general/views.html

在上述链接的页面末尾查看

于 2013-02-05T06:03:10.513 回答
1
 $test = $this->load->view('testing',$data,true);
于 2013-02-05T06:06:22.617 回答
1

添加TRUE为第三个参数:

$test = $this->load->view('testing',$data, TRUE);
于 2013-02-05T06:03:02.720 回答