操作php时间的方法
函数:The strtotime()
功能:将任何英文文本的时间转换为UNIX时间戳(从1970年1月1日(GMT)起经过的秒数),进行一些代数运算
Parameter参数 | Description描述 |
---|---|
time |
Required. Specifies the time string to parse 必要参数。指定需要被解析的时间字符串。 |
now |
Optional. Specifies the timestamp used to calculate the returned value. If this parameter is omitted, current time is used 可选参数。指定用来计算返回值的时间戳。如果这个参数被忽略,那么将默认使用当前时间 |










输出:
1138614504 1128290400 1138632504 1139219304 1139503709 1139180400 1138489200 |
本文地址:http://www.45fan.com/dnjc/72227.html