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

How to modify php time settings in centos

醉折花枝作酒筹
Release: 2023-03-09 11:40:02
Original
2058 people have browsed it

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
Copy after login

Find the date.timezone option and change it to:

date.timezone =PRC
Copy after login

Restart the service

service httpd restart
Copy after login

Single page settings

date_default_timezone_set('PRC')
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template