发布时间:2022-04-19 22:18:08 作者:佚名 阅读:(2786)
今天把服务器上面的PHP版本从5.6.3升级到php7.1.3,打开网站时却提示Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP,接下来吾爱编程为大家介绍一下解决方法,有需要的小伙伴可以参考一下:
由于PHP7开始P不再支持与类名相同的构造方法,构造方法统一使用 __construct(),导致网站在PHP5.6版本下开发的网站不能正常运行。
captcha_width = isset($captcha_width) && $captcha_width > 0 ? $captcha_width : $this->captcha_width; $this->captcha_height = isset($captcha_height) && $captcha_height > 0 ? $captcha_height : $this->captcha_height; } }
更改为:
captcha_width = isset($captcha_width) && $captcha_width > 0 ? $captcha_width : $this->captcha_width; $this->captcha_height = isset($captcha_height) && $captcha_height > 0 ? $captcha_height : $this->captcha_height; } }
以上就是吾爱编程为大家介绍的关于Deprecated: Methods with the same name as their class will not be constructors错误的解决方法,了解更多相关文章请关注吾爱编程网!
欢迎分享转载→ Deprecated: Methods with the same name as their class will not be constructors
Deprecated: Methods with the same name as their class will not be constructors
(2786)人喜欢 2022-04-19if condition多个值_thinkphp if标签的condition用法
(2940)人喜欢 2022-04-19PHP获取今日、昨日、上周、本月的起始时间戳和结束时间戳的方法
(54)人喜欢 2019-06-11PHP判断是否是序列化字符串数据的函数
(1440)人喜欢 2015-11-21php数组排序详解
(34)人喜欢 2015-11-21php文件怎么打开
(252)人喜欢 2015-11-21© 2015-2021 - 吾爱编程网 版权所有 苏ICP备18033726号-1关于我们 - 网站声明 - 联系我们