Home > Backend Development > PHP Problem > php run error

php run error

藏色散人
Release: 2023-02-26 17:04:01
Original
1822 people have browsed it

php run error

php running error?

Problem:

PHP running error message is as follows:

 ():Itisnotsafetorelyonthesystem'stimezonesettings.Youare*required*tousethedate.timezonesettingorthedate_default_timezone_set()function.Inc
Copy after login

Solution:

The following are three methods (any one will work):

1. Use date_default_timezone_set() on the header of the page to set date_default_timezone_set('PRC');

//East Eight Time Zone echo date('Y-m-d H:i:s');

2. Use ini_set('date.timezone','Asia/Shanghai');

3. Modify i in the header.

Open i and search for date.timezone. Remove the preceding semicolon and change it to: date.timezone =PRC

Restart the http service (such as apache2 or iis, etc.).

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of php run error. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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