原来是smarty模板类还是使用了php4的构造函数的写法,所以找到smarty类后,找到与类同名的函数,将函数名改为__construct即可.PHP OOP使用和类名相同的方法名作为构造方法,是 PHP4 的写法,PHP 5中同时支持__construct和类同名方法,但__construct方法具有优先性.
Deprecated: Methods with the same name as their class
Deprecated: Methods with the same name as their class