我似乎找不到问题所在。
// Check that someone from this IP didn't register a user within the last hour (DoS prevention)
$query = mysqli_query($dbc, "SELECT COUNT(id) FROM accounts WHERE registration_ip = '".$_SERVER['REMOTE_ADDR']."' AND registered > ".(time() - 3600));
if (mysqli_num_rows($query) > 0) {
$errors[] = 'To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience.';
}
为什么无论如何这总是返回true?即使帐户表是空的。