php date报错解决
时间:2010-05-06 来源:7717060
最近买了个美国的虚拟服务器,正在装修中ing,在执行php -r "echo date('Ymd');"时,报
查了一下,通过修改php.ini,问题解决.
[email protected]>:# cat php.ini | grep "date.timezone"
; http://php.net/date.timezone
;date.timezone =
将date.timezone注释去掉,然后date.timezone = Asia/Shanghai 问题解决.
Notice: Use of undefined constant Ymd - assumed 'Ymd' in Command line code on line 1 |
[email protected]>:# cat php.ini | grep "date.timezone"
; http://php.net/date.timezone
;date.timezone =
将date.timezone注释去掉,然后date.timezone = Asia/Shanghai 问题解决.
相关阅读 更多 +