OSX上设置PHP的时区 date.timezone

1、修改php配置

打开php.ini文件,找到 [date.timezone] 关键词,将 [;date.timezone = ] 改为:

date.timezone = Asia/Shanghai

2、重启php-fpm和nginx

#brew services restart [email protected]
#brew services restart nginx

3、查看phpinfo.php是否已生效

在浏览器打开:http://localhost/phpinfo.php,如果配置生效当如下截图所示:

猜你喜欢

转载自www.cnblogs.com/lihailin9073/p/11253730.html
今日推荐