Home > php教程 > php手册 > body text

php date()转换mktime()成可读日期

WBOY
Release: 2016-06-13 11:18:35
Original
924 people have browsed it

 

php教程 date()转换mktime()成可读日期

date/time 函数允许您提取并格式化服务器上的日期和时间

mktime() 函数返回一个日期的 unix 时间戳。

参数总是表示 gmt 日期,因此 is_dst 对结果没有影响。

参数可以从右到左依次空着,空着的参数会被设为相应的当前 gmt 值。

语法
mktime(hour,minute,second,month,day,year,is_dst)

 

$s =1294628667;
echo date("y-m-d h:i:s",$s);


Related labels:
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template