Home >Backend Development >PHP Tutorial >smarty模板使用conf配置文件的问题

smarty模板使用conf配置文件的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:49:321018browse

test.tpl


'>



my.conf

title = '我的网站'
bgcolor = 'bule'

执行出错:
Fatal error: in E:\myenv\apache\htdocs\smarty\libs\sysplugins\smarty_internal_config_file_compiler.php on line 139

不知道为什么


回复讨论(解决方案)

你php没导入变量吧?

这是从配置文件里导入数据

my.conf 的位置不对吧?

my.conf 的位置不对吧?



不是这个问题吧,我把conf文件放同一目录下,也是不行,不知道是不是smarty配置问题

你是 ../config/my.conf
所以 config 应在 smarty 的上级目录中

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn