首页 > 其他 > 详细

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use ...报错

时间:2018-12-17 10:48:36      阅读:207      评论:0      收藏:0      [点我收藏+]

错误截图

技术分享图片

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 the timezone ‘UTC‘ for now, but please set date.timezone to select your timezone. in C:\phpStudy\WWW\yii\common\config\bootstrap.php on line 32

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 the timezone ‘UTC‘ for now, but please set date.timezone to select your timezone. in C:\phpStudy\WWW\yii\common\config\bootstrap.php on line 33

  

具体解决方法:

 

修改php.ini配置文件

 

在php.ini配置文件中找到:  ;date.timezone = ,把前面的分号去掉在 “=”后面加上时区。

 

date.timezone = "Asia/Shanghai"

或者

date.timezone="Asia/Chongqing"

 

修改完后,重启apache即可。

技术分享图片

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use ...报错

原文:https://www.cnblogs.com/zhangyouwu/p/10129865.html

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