最新公告
  • 欢迎访问代码工坊,购买产品可享受在线工单服务!
  • 帝国cms7.5版本在php7.0环境下发送邮件时报错问题的解决方法

    使用帝国cms7.5版本在php7.0环境下进行邮件发送时,报如下错误:

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Boundary has a deprecated constructor in /wwwroot/www.daimagongfang.com/e/class/SendEmail.inc.php on line 1518

    从报错来看是由于类名和函数名相同导致的,是一条提示性信息,php7.0开始已经不建议采用这种写法,但仍然可用,未来会禁止这种使用方式。

    我们可以打开/e/class/class.smtp.php文件,将SMTP()函数修改为__construct()即可解决。

    发表评论