0

在我的 PHP 文件中使用

$smarty->config_load('en.conf');

我得到以下信息:

Notice: function call 'config_load' is unknown or deprecated. in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_wrapper.php on line 57

然后我将语句更改为@$smarty->config_load('en.conf');并隐藏错误。

但是,此时我的所有 ajax 脚本都失败了,并且在使用 firebug 的 ajax 响应中,这次我可以看到一个致命错误:

<b>Fatal error</b>:  Uncaught exception 'SmartyException' with message 'Unable to load config file &quot;en.conf&quot;' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php:90
Stack trace:
#0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(39): Smarty_Internal_Config-&gt;buildConfigFilepath()
#1 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(117): Smarty_Internal_Config-&gt;getConfigFilepath()
#2 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(108): Smarty_Internal_Config-&gt;readConfigSource(Object(Smarty_Internal_Config))
#3 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config_file_compiler.php(44): Smarty_Internal_Config-&gt;getConfigSource()
#4 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_in in <b>C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php</b> on line <b>90</b><br />

知道为什么我会收到第一个警告(例如,如果语法已更改)以及为什么会收到致命错误吗?

(Smarty 版本 3.0.8)

谢谢

4

1 回答 1

0

configLoad 是一个词,所以$smarty->configLoad('en.conf');似乎正在解决第一个错误,似乎该功能已在版本 3 中重命名

于 2013-04-07T22:37:02.530 回答