首页 > Web开发 > 详细

centos下在php.ini设置时区

时间:2017-10-29 22:30:39      阅读:696      评论:0      收藏:0      [点我收藏+]

错误:

PHP Warning: Unknown: 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‘ instead in Unknown on line 0

解决方法:

find / -name php.ini  命令找到php.ini配置文件

找到date.timezone选项改为:date.timezone =PRC

service httpd restart 重启服务

(单页面的话可以设置date_default_timezone_set(‘PRC‘)

centos下在php.ini设置时区

原文:http://www.cnblogs.com/yolo-bean/p/7751395.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!