切换到宽版
  • 1423阅读
  • 0回复

[function.strtotime] 错误 及解决方法 [复制链接]

上一主题 下一主题
 

只看楼主 倒序阅读 使用道具 0楼 发表于: 2009-11-02
在php5.3.0下安装wordpress会出现以下错误,盖因时区所未设定方引起。

Warning:  strtotime() [function.strtotime]:It is not safe to rely on the system’s timezone settings. You are*required* to use the date.timezone setting or thedate_default_timezone_set() function. In case you used any of thosemethods and you are still getting this warning, you most likelymisspelled the timezone identifier. We selected ‘UTC’ for ‘8.0/no DST’instead in……

解决方法一:
在php.ini里加入:
date.timezone = “Asia/Shanghai”

解决方法二:
在 /wp/wp-includes/functions.php 里相对应函数里加入:
date_default_timezone_set('Asia/Shanghai');

解决方法三:
在 wp-config.php 里加入:
date_default_timezone_set('Asia/Shanghai');
快速回复
限100 字节
 
上一个 下一个