Home  >  Article  >  Backend Development  >  用phpmailer类做发送邮件功能,提示500异常

用phpmailer类做发送邮件功能,提示500异常

WBOY
WBOYOriginal
2016-06-13 12:49:15936browse

用phpmailer类做发送邮件功能,提示500错误?
我用phpmailer类做发送邮件功能,提示500错误Internal Server Error;
调用代码都应该没问题,接网上实例写的,
是不是在做这个功能之前,还需要什么别的步骤或配置才可以发送邮件呢?

邮件
------解决方案--------------------
出现 500 错误就表示你的代码有问题!
打开 php 的错误显示功能,调试一下
------解决方案--------------------
在php文件页头加上
date_default_timezone_set("PRC");  试试看。
或者php.ini 中设置时区: date.timezone=PRC
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn