怎样设置PHP的timezone
如果在服务器中不设置timezone,总是会报warning, 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。所以需要配置php.ini
操作方法
- 01访问phpinfo,找到php.ini的配置路径 Loaded Configuration File: /etc/php.ini 编辑 /etc/php.ini 
- 02搜索到 timezone,然后更改成为 date.timezone = Asia/Shanghai 保存 
- 03重启apache服务器,访问phpinfo,就会发现warning消失了 
 赞 (0)
                        