小编Joh*_*nny的帖子

为什么它会回归真实?

我似乎无法找到问题.

// 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.';
}
Run Code Online (Sandbox Code Playgroud)

无论如何,为什么总是这样?即使帐户表是空的.

php

0
推荐指数
1
解决办法
98
查看次数

标签 统计

php ×1