phpmailer - 附加大文件

时间:2013-03-25 13:59:57

标签: php phpmailer

我使用phpmailer发送一个大约5M的大附件,但它失败了。 这是信息。

致命错误:第580行的F:\ wamp \ www \ mail \ class.smtp.php超出了30秒的最长执行时间

时间记忆功能位置

1 0.0010 146208 {main}().. \ mail.php:0

2 0.0121 533592 smtp_mail().. \ mail.php:65

3 0.0126 539672 PHPMailer-> Send().. \ mail.php:53

4 0.0928 7303432 PHPMailer-> PostSend().. \ class.phpmailer.php:763

5 0.0929 7303600 PHPMailer-> SmtpSend().. \ class.phpmailer.php:845

6 0.3744 14189928 SMTP-> Data().. \ class.phpmailer.php:1023

我该如何解决这个问题?我想发送一个大附件? 感谢

1 个答案:

答案 0 :(得分:1)

您需要指定更长的set_time_limit值。默认值为30秒。如果脚本的执行时间比完成时间长,则会出现该错误。更多信息:

http://php.net/manual/en/function.set-time-limit.php

相关问题