Fatal error: Call to a member function createTemplate() on a non-object in E:\__www__\MeltPHP.fw\htdocs\framework\extender\Smarty3\sysplugins\smarty_internal_templatebase.php on line 47
在用smarty做网页模板时,如果是继承smarty类开发的话,可能会出现以下错误
Fatal error: Call to a member function createTemplate() on a non-object in E:\__www__\MeltPHP.fw\htdocs\framework\extender\Smarty3\sysplugins\smarty_internal_templatebase.php on line 47
其原因是在继承Smarty类时,子类没有启用父类的构造函数,知道原因,解决方法就很简单了,如下
public function
__construct() {
parent::__construct();
$this
->template_dir =
'templates/'
;
$this
->compile_dir =
'templates_c/'
;
$this
->config_dir =
'configs/'
;
$this
->cache_dir =
'cache/'
;
}
,即在子类构造父类方法即可。
相关推荐
Smarty PHP Template Programming and Applications 随书代码
Smarty Smarty Smarty
Smarty - the compiling PHP template engine的译文版本,高清版。 Smarty 是一个php 模板引擎。更准确的说,它分开了逻辑程序和外在的内容,提供了一种易于管理的方法。
基本文件文件结构 .../libs/ ...$smarty->display('string:This is my template, {$foo}!'); smarty3的相关链接 Smarty 3 Alpha with SVN-- 选择googlecode提供的svn服务还是蛮省钱的 smarty 3开发者邮件组
smarty安装及初级使用 在PHP的世界里已经出现了各式各样的模板类,但就功能和速度来说Smarty还是一直处于领先地位,因为Smarty的功能相对强大,所以使用起来比其他一些模板类稍显复杂了一点。现在就用30分钟让您...
smarty3.0,smarty最新版本
Smarty 模板引擎教程,内容主要有基本语法、变量、组合修改器、内建函数、自定义函数、配置文件、控制台调试、缓存、插件扩展、使用技巧和经验等,比较详细的一个中文手册
Smarty最新版官网,Smarty最新版下载自Smarty官网
php smarty template 2.6.28
Smarty For Template Designers [模板设计者篇] 3. Basic Syntax [基本语法] Comments [注释] Functions [函数] Attributes [属性] Embedding Vars in Double Quotes [双引号里值的嵌入] Math [数学运算] 4....
php模版 (smarty)php模版 (smarty)php模版 (smarty)php模版 (smarty)php模版 (smarty)php模版 (smarty)php模版 (smarty)
Smarty For Template Designers [模板设计者篇] 3. Basic Syntax [基本语法] Comments [注释] Functions [函数] Attributes [属性] Embedding Vars in Double Quotes [双引号里值的嵌入] Math [数学运算] 4....
php5会使用的smarty运算符,smarty是在php前期使用中常见的模版分离,同时国内鼎鼎大名的ecshop也是采用这样方式开发系统
smarty 迷你
smarty中section的使用 smarty section php
5分钟搞定smarty5分钟搞定smarty
1. 速度:采用Smarty编写的程序可以获得最大速度的提高,这一点是相对于其它的模板引擎技术而言的。 2. 编译型:采用Smarty编写的程序在运行时要编译成一个非模板技术的PHP文件,这个文件采用了PHP与HTML混合的...
2015年12月24日最新版:smarty-3.1.29
php Smarty
smarty smarty3.6 带例子 下载,好多例子啊