thinkcmf 时间戳 获取当前时间

获取当前时间 date('Y-m-d H:i:s')

$currenttime =date('Y-m-d H:i:s');
/*转换成时间戳*/
$addtime =strtotime($currenttime);

dump($addtime);
/*时间戳转日期*/

$time = date('Y-m-d H:i:s',$addtime);
dump($time);
posted @ 2018-07-06 16:38  星耀学园  阅读(1478)  评论(0)    收藏  举报