【问题标题】:integrate smarty with codeigniter将 smarty 与 codeigniter 集成
【发布时间】:2015-03-30 07:13:13
【问题描述】:

我是 codeigniter 框架和 smarty 模板的初学者。

我想将 smarty 模板与 codeigniter 框架集成。
我点击链接http://sunwebexpert.com/books/detail/PHP/integrating-smarty-and-codeigniter.html

我遇到了这样的错误

Fatal error: Uncaught --> Smarty: Unable to load template file 'index.tpl' <-- thrown in C:\xampp\htdocs\CodeIgniterNew\application\libraries\smarty\libs\sysplugins\smarty_internal_templatebase.php on line 129

【问题讨论】:

    标签: php codeigniter smarty


    【解决方案1】:

    views/templates 目录中是否有“index.tpl”文件?

    【讨论】:

    • 现在我得到了答案,我的 index.tpl 文件不在视图/模板目录中。我在 application/libraries/smarty.php 文件中的 smarty.php 文件中更改了该路径 $this->setTemplateDir(APPPATH.'view'); $this->setCompileDir(APPPATH.'views');
    猜你喜欢
    • 2010-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-11
    • 2012-11-18
    • 2020-11-20
    • 1970-01-01
    相关资源
    最近更新 更多