我正在尝试将其设置为第一时间,但是会出现以下错误。
致命错误:未捕获错误:调用/home/u6256344/public_html/skripsiindah.online/login.php:51中未定义的函数base_url():堆栈跟踪:#0 {main}抛出于/ home / u6256344 / public_html /第51行上的skripsiindah.online/login.php
if (isset($_POST['login'])) {
$username = anti_injection($_POST['username']);
$password = anti_injection(md5($_POST['password']));
// menghindari sql injection
$injeksi_username = mysqli_real_escape_string($conn, $username);
$injeksi_password = mysqli_real_escape_string($conn, $password);
if (!ctype_alnum($injeksi_username) OR !ctype_alnum($injeksi_password)){
header("Location:".base_url()."/404");
}else{
$query = "SELECT * FROM users WHERE username='$username' AND password='$password'";
$login = $conn->query($query);
$verify = $login->num_rows;
$v = $login->fetch_array();
答案 0 :(得分:0)