Home >Backend Development >PHP Problem >What should I do if the time zone setting in php is invalid?

What should I do if the time zone setting in php is invalid?

藏色散人
藏色散人Original
2021-09-14 10:37:112632browse

Solution to invalid time zone setting in php: 1. Open the httpd.conf file; 2. Add the code "php_value date.timezone PRC" at the end of the file.

What should I do if the time zone setting in php is invalid?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

How to set the time zone invalidly in php manage?

[Development environment] The time zone setting in php.ini does not take effect

It still does not take effect even after configuring it in php.ini

At this time you need to open apache to set it up

Open httpd.conf and add the following codes at the end of the file

<IfModule mod_php7.c>
php_value date.timezone PRC
</IfModule>

Then look at PHP, the setting is successful

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if the time zone setting in php is invalid?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn