1.PHP time configuration, _PHP tutorial

WBOY
Release: 2016-07-12 09:04:13
Original
826 people have browsed it

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

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...
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