Uncaught exception 'SmartyException' with message 'PHP5 requires you to call __construct() instead of Smarty()' in /home/work/index/ui/libraries/smarty/sysplugins/smarty_internal_templatebase.php:803
//APPPATH是入口文件定义的application的目录
require(APPPATH.'libraries/smarty/Smarty.class.php');
class Cismarty extends Smarty {
/**
* 构造函数
*
* @access public
* @param array/string $template_dir
* @return objsmarty obj
*/
function __construct()
{
parent::__construct();
// $this->Smarty();
//ROOT是Codeigniter在入口文件index.php定义的本web应用的根目录
//在入口文件中加入define('ROOT', dirname(__FILE__);
$this->template_dir =ROOT . '/template';
$this->compile_dir=ROOT . '/template_c';
$this->config_dir =ROOT . '/config';
$this->cache_dir =ROOT . '/cache';
}
}
上面这样不会报错,但是没测试widget是否可以用
页:
1
[2]