可以了,但提示这个:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; smtp has a deprecated constructor in D:\localuser\ftp63600000\Web\mail\Smtp.class.php on line 2
恭喜!邮件发送成功!
怎么解决呢?我的版本是7.0.3
In previous versions of PHP, if PHP cannot find a __construct() function for a given class, it will search for the old-style constructor function, by the name of the class, but now old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use __construct() in new code. Read php manual
function __construct() {
// copy your old constructor function code here
}
lsmh 发表于 2020-4-7 10:23
可以了,但提示这个:
Deprecated: Methods with the same name as their class will not be constructors ...
In previous versions of PHP, if PHP cannot find a __construct() function for a given class, it will search for the old-style constructor function, by the name of the class, but now old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use __construct() in new code. Read php manual
function __construct() {
// copy your old constructor function code here
}