问题
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
Trying to send an email using codeigniter Email library I get this error.I think I should specify the date_default_timezone_set but I don't know where I have to specify it since I don't use date when I send mail.
回答1:
Either set date.timezone
in your php.ini file, or if that isn't possible, use:
ini_set('date.timezone', 'Europe/London');
in CodeIgniter's index.php file.
来源:https://stackoverflow.com/questions/9467687/date-error-sending-mail-using-codeigniter