Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要获取我的数据库作为 NOW() 使用的当前时间并将其显示给用户。我怎样才能做到这一点?
用作NOW()什么?这个时间和日期是否与我的 PHP 配置有关,或者它们是数据库独有的?
NOW()
<?php $query = "SELECT NOW() as `now`"; $result = $mysqli->query($query); $row = $result->fetch_array(); $now = $row['now']; echo "$now\n"; ?>