時間錯誤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便可。