Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings.

运行部分php时,有时会出现如下错误:

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.

这是php的时区设置方面的问题,解决办法:
修改php.ini文件,将

; date.timezone =

改为:

date.timezone = "Asia/Shanghai"

发表评论

电子邮件地址不会被公开。