文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>php date报错解决

php date报错解决

时间:2010-05-06  来源:7717060

最近买了个美国的虚拟服务器,正在装修中ing,在执行php -r "echo date('Ymd');"时,报




Notice: Use of undefined constant Ymd - assumed 'Ymd' in Command line code on line 1
PHP Warning: 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 'Asia/Chongqing' for
 'CST/8.0/no DST

查了一下,通过修改php.ini,问题解决.

[email protected]>:# cat php.ini | grep "date.timezone"
; http://php.net/date.timezone
;date.timezone =

将date.timezone注释去掉,然后date.timezone = Asia/Shanghai 问题解决.
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载