Home  >  Article  >  Backend Development  >  How to modify php time settings in centos

How to modify php time settings in centos

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-04-19 15:28:022019browse

Method: First execute the "find / -name php.ini" command to find the "php.ini" file; then open the file, find and modify the value of the "date.timezone" item; finally execute "service httpd restart ” command to restart the service.

How to modify php time settings in centos

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

Find the php.ini configuration file

find / -name php.ini

Find the date.timezone option and change it to:

date.timezone =PRC

Restart the service

service httpd restart

Single page settings

date_default_timezone_set('PRC')

Recommended: "2021 PHP Summary of interview questions (collection)》《php video tutorial

The above is the detailed content of How to modify php time settings in centos. 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