解决方案 »
- 易宝支付提示: 抱歉,订单信息丢失,请从商户网站重新提交
- 求:php生成全静态网站
- 为什么下拉框的第一个是已经selected的
- windows xp2下 apache_2.2.6+php-5.2.6+MySQL-5.0.45+phpMyAdmin-2.11.6+ZendOptimizer-3.3.0a 配置
- php页面返回到ajax提交页面的是乱码
- 关于PHP 正则时间的问题
- 公交搜索网上线,隆重送分!!!
- php如何连接oracle数据库?急!
- 关于php+mysql的表间的连接查询 请帮我解惑 谢谢
- 大家快来帮帮我
- 怎么用curl或者file_get_contents 采集重定向之前的页面内容呢?
- mysqli连接数据库问题
已经贴了啊,没贴的smarty类文件Smarty.class.php是下载的!
abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
这是一的抽象类,没有定义 createTemplate() 方法你必须在继承类中自行定义,或许已在 Smarty_Internal_Data 中定义过了也未可知
不过既然是 member function createTemplate() on a non-object 显然是继承类没有实例化或者是对象被关在外边了
没有引用正确,按照楼主的目录结构:
|--Smarty.class.php
|--system
|--system.inc.php
|--system.smarty.inc.phpsystem.smarty.inc.php文件中:
require '../Smarty.class.php';
这么引用会报错
Warning: require(../Smarty.class.php) [function.require]: failed to open stream: No such file or directory in
public function __construct() {
parent::__construct();
$this->template_dir = 'templates/';
$this->compile_dir = 'templates_c/';
$this->config_dir = 'configs/';
$this->cache_dir = 'cache/';
}
眼神果然犀利 , 一眼就看出继承了 Smarty , 并且自己使用了 __construct 那么 smarty 的构造方法就不会运行 , 所以 parent::__construct 才是正解 .
斑猪们不行啊 .