当你发现__autoload()不好使,其实是
Smarty3.0跟php的__autoload()有冲突
见Smarty3.0 中的SMARTY2_BC_NOTES文件:
--------------------------------------
== Autoloader ==
Smarty 3 does register its own autoloader with spl_autoload_register. If your code has
an existing __autoload function then this function must be explicitly registered on
the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php
for further details.
--------------------------------------
解决办法:
“在包含了 smarty 的源文件后执行 spl_autoload_register(“__autoload”) 解决多种加载方式共存,这样 __autoload函数仍能执行。”