首页建站经验 安装ecshop报错date_default_timezone_set的解决法

安装ecshop报错date_default_timezone_set的解决法

安装ecshop出现警告: 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_de…

安装ecshop出现警告: 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data/wwwroot/includes/lib_time.php on line 28 OK

如图所示

安装ecshop报错date_default_timezone_set的解决法

我们可以打开init.php找到

if (PHP_VERSION >= '5.1' && !empty($timezone))

{

date_default_timezone_set($timezone);

}

改成

if (PHP_VERSION >= '5.1')

{

empty($timezone) date_default_timezone_set("PRC"):date_default_timezone_set($timezone);

}

就可以了,如果这样还是不行,就只有改php.ini,然后重启服务器

在php.ini中设置

date.timezone=PRC

教程完毕,这个是时区问题

本文来自网络,不代表1号站长-站长学院|资讯交流平台立场。转载请注明出处: https://www.1cn.cc/jianzhan/jingyan/18340.html
上一篇修ecshop品牌筛选以LOGO图片形式显示
下一篇 修改ecshop分类与文章只显示分类名称文章标题
admin

作者: admin

这里可以再内容模板定义一些文字和说明,也可以调用对应作者的简介!或者做一些网站的描述之类的文字或者HTML!

为您推荐

评论列表()

    联系我们

    联系我们

    0898-88888888

    在线咨询: QQ交谈

    邮箱: email@wangzhan.com

    工作时间:周一至周五,9:00-17:30,节假日休息

    关注微信
    微信扫一扫关注我们

    微信扫一扫关注我们

    关注微博
    返回顶部