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

php的版本较高需要配置php.ini

解决方法

   1:改 php.ini

[Date]

; Defines the default timezone used by the date functions

http://php.net/date.timezone

date.timezone ='Asia/Shanghai'

2:在程序代码中写入

第一行写入date_default_timezone_set ('Asia/Shanghai');

 

php 5.3出这个问题,需要修改php.ini文件 找到date.timezone

将它的改为 date.timezone=utc 将前面的分号去掉,重启服务器

  • 或者在index.php中加上 date_default_timezone_set(‘UTC’);
posted @ 2012-04-14 12:45  非著名程序师  阅读(589)  评论(0编辑  收藏  举报