【发布时间】:2014-07-20 12:55:03
【问题描述】:
我的 PHP 代码中有这一行,用于根据日期、成员 ID 和评论生成 guid:
$md5c = md5($member_id.$comment.$topic_id.$plan_id.date("Y-m-d") );
最近它开始发出这样的警告信息:
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 getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
有谁知道如何更改该代码以便不生成此警告?
谢谢!
【问题讨论】:
-
打开您的
PHP.ini并为@Saman Gholami 的答案中提到的date.timezone设置写入一个新值
标签: php