用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3640|回复: 9
收起左侧

[版本 3.x] 3.0模板里没办法加载模板了?

[复制链接]
发表于 2015-4-8 11:24:48 | 显示全部楼层 |阅读模式
RT,模板里面加载其他模板会报错?
PHP复制代码
 
<?php echo $this->load->view('header_view.php');?>
 
hello world.
 
<?php echo $this->load->view('footer_view');?>
 
 
复制代码

A PHP Error was encounteredSeverity: 4096
Message: Object of class CI_Loader could not be converted to string
Filename: views/main_view.php
Line Number: 1
Backtrace:
File: E:\web\common_yadgen\application\views\main_view.php
Line: 1
Function: _error_handler
File: E:\web\common_yadgen\application\controllers\main.php
Line: 10
Function: view
File: E:\web\common_yadgen\index.php
Line: 292
Function: require_once

hello world.A PHP Error was encounteredSeverity: 4096
Message: Object of class CI_Loader could not be converted to string
Filename: views/main_view.php
Line Number: 5
Backtrace:
File: E:\web\common_yadgen\application\views\main_view.php
Line: 5
Function: _error_handler
File: E:\web\common_yadgen\application\controllers\main.php
Line: 10
Function: view
File: E:\web\common_yadgen\index.php
Line: 292
Function: require_once



发表于 2015-4-8 11:33:27 | 显示全部楼层
亲,没有  echo
 楼主| 发表于 2015-4-8 11:59:53 | 显示全部楼层

仔细看,有echo
发表于 2015-4-8 12:32:28 CI中国手机版 | 显示全部楼层
yadgen 发表于 2015-4-8 11:59
仔细看,有echo

晕,这理解力。。。。
 楼主| 发表于 2015-4-8 13:57:09 | 显示全部楼层
yuzhigang5460 发表于 2015-4-8 12:32
晕,这理解力。。。。

那是什么?
发表于 2015-4-8 14:04:21 | 显示全部楼层

不需要 echo 的意思...
 楼主| 发表于 2015-4-8 14:21:56 | 显示全部楼层
question done, thanks, boths.
发表于 2015-4-21 15:36:51 | 显示全部楼层
楼上戳我笑点了.不过楼主解决了问题就好
发表于 2015-5-5 16:34:15 | 显示全部楼层
可爱的楼主~

本版积分规则