作者Uihc (我 有我的倔強...)
看板PHP
標題[請益] 想請問警告訊息的意思
時間Wed Oct 24 16:50:48 2007
有一個警告訊息困惑很久了,之前忙著把其它功能寫完所以沒有去理它...
雖然有取得想要的結果,但是每次執行都會出現下面的警告訊息,覺得很礙眼= =:
PHP Strict Standards: date() [<a href='function.date'>function.date</a>]: It
is not safe to rely on the system's timezone settings. Please use the
date.timezone setting, the TZ environment variable 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
X:\php\abc.php on line 89
89行,我只是想利用日期搭配$Code內的字串產生一組id,程式碼如下:
$ID=$Code."-".date(Ymd);
想請教各位前輩,這段訊息是叫我做什麼呢??
謝謝^^
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.64.235
推 buganini:#4376 10/24 16:55
→ buganini:而且訊息裡明明就有寫啊 10/24 16:56
→ book989:少了引號嗎= =a 猜的 10/24 17:10
→ Uihc:唔 但是我都有如預期取到了日期->yyyymmdd 所以不明白警告 10/24 17:33
→ Uihc:喔喔 改了時區果然有用...感謝^^ 10/24 17:47
推 buganini:因為你error reporting設到E_STRICT所以他特別嚴格啊 10/24 18:31