Home >Backend Development >PHP Tutorial >1.PHP time configuration, _PHP tutorial

1.PHP time configuration, _PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:04:13859browse

1. PHP time configuration,

1. Open the PHP configuration file, php.ini, find the " ;date.timezone=" option under [date], and modify it to Asia/Hong_Kong Then restart the server;

2. Before using the time function, add the function " date_default_timezone_set("Asia/Hong_Kong"); "

3. Enter the local time function:

date("Y-m-d H:i:s")

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1073814.htmlTechArticle1. PHP time configuration, 1. Open the PHP configuration file, php.ini, and find under [date] " ;date.timezone=" option, change it to Asia/Hong_Kong and then restart the server; 2. Before using the time function...
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