欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ECSHOP安裝數(shù)據(jù)庫失敗date_default_timezone_get()問題

  發(fā)布時間:2012-01-08 18:54:57   作者:佚名   我要評論
今天在倒騰ECSHOP時遇到的問題,以向?qū)J桨惭b時遇到具體的PHP警告如下
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 D:\wwwroot\shop\upload\install\includes\lib_installer.php on line 223

很明顯是由于PHP默認(rèn)的時間區(qū)域設(shè)置問題導(dǎo)致的警告,本來也沒什么,不過這個警告最后還是給我?guī)砹寺闊?,主要是?shù)據(jù)庫那段過不去,不得已,只有自己動手修改了,這里有兩種辦法供大家參考:

1. 修改\install\includes\lib_installer.php文件。在這個文件頂部<?php之內(nèi)加上如下PHP代碼:


復(fù)制代碼
代碼如下:
date_default_timezone_set ('Asia/Shanghai');


這是個臨時的解決辦法,可以幫你成功安裝數(shù)據(jù)庫,長久之計(jì)還是要看方法2。

2. 修改PHP配置文件。如果你服務(wù)器的主要時區(qū)是亞洲上海,那么修改這里是比較妥當(dāng)?shù)?,?dāng)然更穩(wěn)妥的辦法是通過.htaccess導(dǎo)入PHP設(shè)置。

打開PHP.INI大概在958找到; date.timezone =去掉前面的注釋;號,然后改成date.timezone =Asia/Shanghai,保存配置文件,重啟你的服務(wù)器。

好的,這個問題也就這樣很好的解決了。

相關(guān)文章

最新評論