Home  >  Article  >  Backend Development  >  php run error

php run error

藏色散人
藏色散人Original
2019-10-15 09:41:291818browse

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

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!

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