【发布时间】:2016-03-02 06:00:34
【问题描述】:
我看到让数据库表出现,类似于
$dataToBePassed = //SOME QUERY
$this->load->view('viewpage', $dataToBePassed);用于
但是我将如何使用模板呢?
就像我有这个将视图加载到我的模板中一样
$data['content_view'] = 'viewpage';
$this->templates->admin_template($data);
然后将传递给
//templates html codes
<?php $this->load->view($content_view); ?>
//templates html codes
我该怎么做
//templates html codes
<?php $this->load->view($content_view); ?>
//templates html codes
喜欢这个
//templates html codes
<?php $this->load->view($content_view, $data); ?>
//templates html codes
【问题讨论】:
-
您的编码中显示什么错误?
-
你可以使用,你有什么错误吗?
-
没有错误,但昨天我不知道我做了什么,但我认为我从检查元素错误中单击了某些内容,它显示模板变形并且正文显示
'Job_Titles/jobtitles_read', $data, FALSE.php未找到
标签: php codeigniter view