使用codeigniter发送邮件的日期错误

时间:2012-02-27 15:35:09

标签: php email codeigniter date

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但我不知道在哪里指定它,因为我在发送邮件时没有使用日期。

1 个答案:

答案 0 :(得分:3)

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

ini_set('date.timezone', 'Europe/London');
CodeIgniter的index.php文件中的