Loving Coding & Visual Design

PHP: getdate()错误

PHP5中当在ini中指定错误级别为E_STRICT时,可能导致getdate出现如下错误:
getdate() [function.getdate]: 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.

解决办法可以在 getdate() 前面加上:
date_default_timezone_set('时区名');

时区名如:Asia/Hong_Kong,时区列表可以参看这里



下一页


最 近 文 章

  1. Lonely Planet旅行指南 - 全球旅行者的首选 - Wed, 17 Jan 2007 13:09:48 +0000
  2. PHP post error: Forbidden - You don't have permission to access - Mon, 08 Jan 2007 04:16:16 +0000
  3. Js版WMA的media player播放器插件 - Tue, 02 Jan 2007 06:19:46 +0000
  4. 许多社区使用的flash图片展示小插件 - Fri, 29 Dec 2006 10:57:38 +0000
  5. Picasa网络相册测试 - Fri, 22 Dec 2006 05:27:20 +0000
  6. Flash Pro 8试用 - Thu, 21 Dec 2006 06:30:45 +0000
  7. 关于SPAM - Wed, 20 Dec 2006 03:23:51 +0000
  8. Hello World - Wed, 29 Nov 2006 12:58:01 +0000
  9. 厌倦了乏味的搜索? - Fri, 10 Nov 2006 01:24:40 +0000
  10. 快速接触apache:mod_rewrite - Fri, 03 Nov 2006 00:55:39 +0000