程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> PHP綜合 >> PHP 5.3.3 下 ECSHOP 安裝錯誤

PHP 5.3.3 下 ECSHOP 安裝錯誤

編輯:PHP綜合

PHP 5.3.3 下 ECSHOP 安裝錯誤


在安裝 ECSHOP 的時候,提示安裝失敗,提示信息如下:
Warning: date_default_timezone_get() [function.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

install\includes\lib_installer.php
檢查 PHP 手冊,有注明:
Note:

Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate

a E_NOTICE if the timezone isn't valid, and/or a E_WARNING message if using the system settings or the TZ

environment variable.
造成 WARNING 原來是系統配置裡沒有設定默認時區,ECSHOP 調用 date_default_time_get (date/time 函數) 時則會產生錯

誤。在 php.ini 裡設定一下:
date.timezone = Asia/Shanghai
或在代碼裡加入 date_default_timezone_set ('Asia/Shanghai'); 即可解決

*
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved