Home > Backend Development > PHP Tutorial > 关于$_SERVER['REQUEST_TIME']的疑问

关于$_SERVER['REQUEST_TIME']的疑问

WBOY
Release: 2016-06-23 14:00:02
Original
1096 people have browsed it

看php的手册,$_SERVER['REQUEST_TIME'],指的是脚本的开始运行时间,但是疑问就来了:

我现在的时间明明是2014-03-28 11:27,

可是我
echo date('Y-m-d m:i:s',$_SERVER['REQUEST_TIME']);

出来的时间却是 2014-03-28 03:28:45 

请问这是怎么一回事??问题很急,请大家务必帮忙,谢谢大家,谢谢!!!!!!


回复讨论(解决方案)

date_default_timezone_set(‘Asia/Shanghai');  时区问题 

Y-m-d  m:i:s  : m数字表示的月份,有前导零 ,不是03是什么?
echo date('Y-m-d  H:i:s',$_SERVER['REQUEST_TIME']);  //这样才是对的

被你忽悠了
echo date('Y-m-d  m:i:s',$_SERVER['REQUEST_TIME']);
m 是什么?

我也被忽悠了。。。。

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