$currentDate = date('Y-m-d H:i:s');
$lastDate = $data[0]['inputTime'];
<?php
echo "<br>Current Date ".$currentDate;
echo "<br>Last Date ".$lastDate;
$diff = round(abs($currentDate - $lastDate) / 60,2);
?>
它没有工作我从mysql得到$ lastdate,数据类型是DateTime但它不起作用请帮助,如果有另一种方式请指导我我在实时域测试它在localhost工作正常虽然