繁体   English   中英

使用codeigniter发送电子邮件SMTP时出现时间错误 - mediatemple hosting

[英]Time error when sending email SMTP with codeigniter - mediatemple hosting

我使用codeigniters电子邮件助手(SMTP)从我的网站发送电子邮件

电子邮件正在成功发送到我的收件箱但是我收到以下错误:

A PHP Error was encountered

Severity: Warning

Message: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PST/-8.0/no DST' instead

Filename: libraries/Email.php

Line Number: 704

我最近将我的主机切换到mediatemple,之前没有这样的消息。 我需要在某个地方或时区指定时间格式吗?

在您的php.ini文件中设置date.timezone ,警告应该消失。

我相信MediaTemple允许您通过在主目录中包含php.ini来编辑php.ini设置。

如果你没有更新php.ini的权限(通常你没有),
你可以将这一行添加到你的PHP脚本: -

date_default_timezone_set("Asia/Singapore"); <-- replace to your desire city

这里有关于此功能的更多文档: http//uk.php.net/date_default_timezone_set

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM