解析由 strftime() 生成的时间/日期:
<?PHP
$format="%d/%m/%Y %H:%M:%S";
$strf=strftime($format);
echo("$strf");
print_r(strptime($strf,$format)
);
?>
定义和用法
strptime() 函数解析由 strftime() 生成的时间/日期。
注释:该函数未在 Windows 平台下实现。
语法
strptime(date,format);
参数 | 描述 |
---|---|
date | 必需。要解析的字符串(例如:由 strftime() 返回的)。 |
format |
必需。规定日期中要使用的格式:
|