在我的 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 "en.conf"' 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->buildConfigFilepath()
#1 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(117): Smarty_Internal_Config->getConfigFilepath()
#2 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(108): Smarty_Internal_Config->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->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)
谢谢