时间错误php
PHP 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 gett ing this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data0/htdocs/www.qttc.net/function/function.php on line 542
##第一种 在页面头部加入如下语句 复制代码 代码以下:服务器
date_default_timezone_set("PRC");
这种方法有个缺点,就是全部的页面都得添加 ##第二种ide
在php.ini里找到date.timezone这行,把值改为PRC,如date.timezone = PRC。若是没有这一行直接加上就好。最后重启WEB服务器与PHP便可。