Php calculate the number of days of registration

$time = date("Y-m-d H:i:s");
$res['time'] = ceil((strtotime($time)-strtotime($res['time']))/86400);

 

Guess you like

Origin www.cnblogs.com/chenliuxiao/p/12469370.html