php脚本中使用date函数提示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. in /var/www/html/XXX/test.php on line 9。
编辑/etc/php.ini文件找到;date.timezone =这一行,将;去掉并在=后面添加默认时区,如:
date.timezone = Asia/Chongqing