当前位置: 主页 » 网站开发 » 时区问题导致的 500 – 内部服务器错误。

时区问题导致的 500 – 内部服务器错误。

2023年3月31日 01:19

时区问题导致的 500 – 内部服务器错误。 导致500错误的原因有很多,我在安装php时就遇到过因为时区没有设置而产生的500错误
将IE浏览器设置成如下图后真正的问题就会显存出来
时区问题导致的 500 – 内部服务器错误。插图
PHP Warning: phpinfo(): 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 ‘UTC’ for ‘8.0/no DST’ instead in
下面是我放在服务器上的测试文件,在没有修改前报错
C:\inetpub\wwwroot\1.php on line 2
找到php.ini文件里面查找date.timezone设置成这个就可以了date.timezone =Asia/Chongqing