php时间不正确的解决方法分享


2。date_default_timezone_set(“PRC”);
3。PHP 5.1以上
PHP.ini
date.timezone = PRC
或则
设置时区,php5新增的。
再php.ini中找到
[Date]
; Defines the default timezone used by the date functions
date.timezone =Asia/Shanghai
修改为如上就可以了,更多的timezone支持请到php网站可找到。

—-想了解更多的php相关异常处理怎么解决关注<计算机技术网(www.ctvol.com)!!>



本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/phpttorial/87043.html

(0)
上一篇 2020年4月23日
下一篇 2020年4月23日

精彩推荐