我有这个脚本通过电子邮件发送一些通过cron运行的统计信息,但它在cron上的这一点上不断下降。任何人都可以帮忙,不是我的剧本,它是有效的,我刚刚接手了一点新手。
PHP警告:file_get_contents(http://www.mydomain.co.uk/folder1/folder2/emails/jl_jobs_progress.email.php?do=user&name=barrytibbetts&fullname=BARRY+TIBBETTS&jobs=1):无法打开流:第220行/var/www/folder1/folder2/classes/emails.class.php中的连接超时
第220行指出------
public function doJobsWaitingAlert($p_jobs_waiting,$p_cons_email,$p_cons_user,$p_cons_fullname)
{
try
{
$this->m_mail->ClearAllRecipients();
$this->m_mail->Priority = 1; //high
$this->m_mail->Subject = sprintf("%s %s Jobs Require Immediate Attention", $p_cons_fullname, $p_jobs_waiting);
$this->m_mail->MsgHTML(file_get_contents(sprintf("%semails/jl_jobs_progress.email.php?do=user&name=%s&fullname=%s&jobs=%s",
_URL,
urlencode($p_cons_user),
urlencode(strtoupper($p_cons_fullname)),
urlencode($p_jobs_waiting)
)
// LINE 220 )
);
$this->m_mail->AltBody = sprintf("To view this alert you need to enable HTML display on your email, or you can view this page online at %s",_URL);
if (_NOTIFY_LIVE) {
$this->m_mail->AddAddress($p_cons_email,$p_cons_fullname);
} else {
$this->m_mail->AddAddress(_NOTIFY_TEST_EMAIL,$p_cons_fullname);
}
$this->m_mail->Send();
return 1;
} catch (phpmailerException $e) {
echo $e->errorMessage();
return 0;
}
}