码迷,mamicode.com
首页 > Web开发 > 详细

centos下在php.ini设置时区

时间:2017-10-29 23:16:36      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:错误   选项   方法   ice   ide   red   命令   settings   war   

错误:

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设置时区

标签:错误   选项   方法   ice   ide   red   命令   settings   war   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!