Methods with the same name as their class will not be constructors in a future version of PHP ...
这个报错的原因是 PHP7 不再支持与类名相同的构造方法,构造方法统一使用 __construct(), 比如下面的写法 PHP7 就会报这个错误。
<?php class foo { function foo() { echo 'I am the constructor'; } } ?> 将构造方法 ECS 修改为 __construct, 刷新首页,发现已经没有错误了
转载于:https://blog.51cto.com/12293320/1900506