&引用;application.extensions.yiiext.renders.smarty.esmartyviewrender“;
我已按规定将smarty模板集成到我的应用程序中 但是我得到了上面的错误 我已经尝试了所有可能的方法来粘贴Yii Smarty解析器 配置&引用;application.extensions.yiiext.renders.smarty.esmartyviewrender“;,yii,smarty,Yii,Smarty,我已按规定将smarty模板集成到我的应用程序中 但是我得到了上面的错误 我已经尝试了所有可能的方法来粘贴Yii Smarty解析器 配置 'viewRenderer'=>array( 'class'=>'application.ext.ESmartyViewRenderer', 'fileExtension' => '.tpl', //'pluginsDir' => 'application.smartyPlugins',
'viewRenderer'=>array(
'class'=>'application.ext.ESmartyViewRenderer',
'fileExtension' => '.tpl',
//'pluginsDir' => 'application.smartyPlugins',
//'configDir' => 'application.smartyConfig',
//'prefilters' => array(array('MyClass','filterMethod')),
//'postfilters' => array(),
//'config'=>array(
// 'force_compile' => YII_DEBUG,
// ... any Smarty object parameter
//)
),
我很高兴看到是否有人建议其他(最好的)模板引擎
编辑
精确错误消息
Alias "application.extensions.yiiext.renderers.smarty.ESmartyViewRenderer" is invalid. Make sure it points to an existing PHP file and the file is readable.
在上述情况下使用正确的路径
application.extensions.ESmartyViewRenderer
如果将文件解压缩到新文件夹protected/extensions/smarty而不是protected/extensions中
然后使用
application.extensions.smarty.ESmartyViewRenderer
在上述情况下使用正确的路径
application.extensions.ESmartyViewRenderer
如果将文件解压缩到新文件夹protected/extensions/smarty而不是protected/extensions中
然后使用
application.extensions.smarty.ESmartyViewRenderer
您应该尝试以下方法:
'class'=>'ext.ESmartyViewRenderer', // or application.extensions.ESmartyViewRenderer should also work
受保护/扩展目录已别名为ext
,您应该尝试使用:
'class'=>'ext.ESmartyViewRenderer', // or application.extensions.ESmartyViewRenderer should also work
受保护/扩展目录已别名为
ext
您的错误不清楚(不完整),具体是什么?@bool.dev:编辑了我的问题..你用ext.esmartyviewrender
试过了吗?请显示你的配置文件我的意思是只ext.esmartyviewrender
而不是应用程序。ext.esmartyviewrender
反正你还有很多其他文件、文件夹,应该只有ESmartyViewRenderer和plugins目录您的错误不清楚(不完整),具体是什么?@bool.dev:编辑了我的问题..你用ext.esmartyviewrender
试过了吗?请显示你的配置文件我的意思是只ext.esmartyviewrender
而不是应用程序。ext.esmartyviewrender
反正你还有很多其他文件、文件夹,它应该只有ESmartyViewRenderer和plugins目录实际上这也是正确的,hemc还显示了如何访问扩展名,以防扩展名文件位于另一个文件夹中。加上一个事实上这也是正确的,hemc还展示了如何访问扩展名,以防扩展名文件位于另一个文件夹中。所以再加一