欢迎光临
我们一直在努力

ecshop date_default_timezone_get()

date_default_timezone_get() ,个别国外空间才会出现这个错误。

Warning: date_default_timezone_get(): 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 ‘UTC’ for ’8.0/no
DST’ instead in C:\wwwroot\includes\lib_installer.php on line 223

以上提示是说明由于PHP默认的时间区域设置问题导致的警告,导致数据库那段过不去而无法完成安装,我门提供两种解决办法如下:
1. 修改\includes\lib_installer.php文件,在这个文件顶部<?php之内加上如下PHP代码:

date_default_timezone_set ('Asia/Shanghai');//设置当前默认时区为亚洲上海

这个是临时的解决办法,可以帮你成功安装数据库,长久之计还是要采用方法2。

2. 修改服务器的PHP配置文件。
打开php安装目录,找到php.ini文件搜索到; date.timezone = 去掉前面的注释;号,然后改成date.timezone =Asia/Shanghai,保存配置文件,重启服务。

赞(0) 打赏
未经允许不得转载:程序开发爱好者 » ecshop date_default_timezone_get()
分享到: 更多 (0)

网站设计及开发、微应用及微网站开发、微信公众平台开发、 HTML5手机网站开发、网络整合营销、APP开发、软件开发及企业电商服务

联系我们