【问题标题】:Date error sending mail using codeigniter使用 codeigniter 发送邮件的日期错误
【发布时间】:2012-03-17 02:00:12
【问题描述】:
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 'Europe/Berlin' for 'CET/1.0/no DST' instead

Filename: libraries/Email.php

Line Number: 704
Line Number 709

尝试使用 codeigniter 电子邮件库发送电子邮件时收到此错误。我想我应该指定 date_default_timezone_set 但我不知道我必须在哪里指定它,因为我在发送邮件时不使用日期。

【问题讨论】:

  • 我在一分钟前回答了你,为什么要为同样的问题打开一个新问题?编辑你的 php.ini 文件,它会解决你所有的错误。

标签: php email codeigniter date


【解决方案1】:

在您的 php.ini 文件中设置 date.timezone,或者如果这不可行,请使用:

ini_set('date.timezone', 'Europe/London');

在 CodeIgniter 的 index.php 文件中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-02
    • 2017-11-10
    • 2015-03-17
    • 2016-05-06
    • 1970-01-01
    • 2016-09-02
    • 2015-08-02
    • 1970-01-01
    相关资源
    最近更新 更多