Recently, there are always system email prompts. I didn’t pay attention to it at first, but then I checked it after the prompts kept coming. Prompt the following information
The first type
Add the following statement to the head of the page
Second type
Find the date.timezone line in php.ini and change the value to PRC, such as date.timezone = PRC. If there is no such line, just add it directly. Finally, restart the WEB server and PHP.
Find date.timezone
in the php.ini file and set it to this date.timezone =Asia/Chongqing
This is just a warning (Warning). Although it can be ignored, execution result errors may occur.
There is something wrong with the date (Y-m-d H:i:s) parameter you wrote. The correct way to write it is:
date('Y-m-d H:i:s',time()); //The following, time( ) can be omitted, but it is best to form a habit and write it in a more standardized way.
In addition, if you set the time zone (such as Shanghai, China, etc.), it will be more accurate.
For example, write this at the front of the file:
date_default_timezone_set('Asia/Shanghai'); //Set the time zone to "Asia/Shanghai", which is China.
echo date('Y-m-d H:i:s',time());
?>
Hope it helps!