$this->load->library('My_Smarty ');
print_r($this->My_Smarty )
输出报错:
Undefined property: Index::$My_Smarty 靠,从没见过,贴controllers 使用smarty模板引擎? 本帖最后由 小白TO大白 于 2012-3-26 11:49 编辑
sdink 发表于 2012-3-26 10:51 static/image/common/back.gif
靠,从没见过,贴controllers
class Index extends CI_Controller {
private $page = 1; //当前显示的页数,默认为1
function __construct()
{
parent::__construct();
}
//显示问题列表
public function index()
{
$this->load->library('My_Smarty');
$this->My_Smarty->viewWithDefaultTemplate('home/index.tpl');
}}
80后 发表于 2012-3-26 11:22 static/image/common/back.gif
使用smarty模板引擎?
是的是的是的 http://codeigniter.org.cn/user_guide/general/creating_libraries.html sdink 发表于 2012-3-26 13:18 static/image/common/back.gif
http://codeigniter.org.cn/user_guide/general/creating_libraries.html
谢谢了,原来是没有小写!!!
页:
1
[2]