在thinkphp里面结合使用smarty模板,都已经配置好了,在IndexAction.class.php文件里面使用$this->display("login")没有问题,但是另外一个文件DefaultAction.class.php文件里面同样使用,则出现以下问题:
Fatal error: Call to a member function display() on a non-object in E:\php\AppServ\www\DLP\ThinkPHP\Lib\Think\Core\Action.class.php on line 103其中Action.class.php那边的代码是: protected function display($templateFile='',$charset='',$contentType='text/html')
{echo $templateFile;
if(false === $templateFile) {
$this->showTrace();
}else{
$this->view->display($templateFile,$charset,$contentType);
}
}有没有出现过同样问题的大哥,给个帮助...
Fatal error: Call to a member function display() on a non-object in E:\php\AppServ\www\DLP\ThinkPHP\Lib\Think\Core\Action.class.php on line 103其中Action.class.php那边的代码是: protected function display($templateFile='',$charset='',$contentType='text/html')
{echo $templateFile;
if(false === $templateFile) {
$this->showTrace();
}else{
$this->view->display($templateFile,$charset,$contentType);
}
}有没有出现过同样问题的大哥,给个帮助...
解决方案 »
- 打开php页面为何速度很慢?
- 帝国CMS [ecmsinfo]标签 使用SQL语句
- discuz X2.5的用户动态是那个表ucenter_feed还是home_feed表
- 大家帮我看一下这个数组合并的问题
- php通过网关发短信
- 哥哥姐姐们 你们帮我分析一下 你们学编程语言的技巧 和自学技巧 还有 学编程的方法 我这个人笨 老师讲的我会用 让我自己想我就楞了 我是不是欠缺一种方法啊 我是个初中毕业 呵呵
- 怎么取得一个日期的UNIX时间戳
- ThinkPHP 截取字符串问题
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result reso
- 请大神看一下是什么情况
- 【开源】我开发的贴吧(mysql5.2+linux+asp.net),先公开测试一下后台管理系统
- 求一个php+mysql的简单文章/新闻/博客系统
function __construct()
{
//content
}在TP中要用function __construct()
{
parent::__construct;
}