解决未捕获的 ArgumentCountError

问题描述 投票:0回答:0

致命错误:Uncaught ArgumentCountError: Too fee Arguments to function emptyInputSignup(), 4 传入 C:\xamp\htdocs\AnotherLoginSystem\includes\sign up.inc.php 第 14 行 正好有 5 个预计在 C:\xamp\htdocs\AnotherLoginSystem\includes unctions.inc.php:3 堆栈 跟踪:#0 C:\Xampp\htdocs\AnotherLoginSystem\includes\sign up.inc.php(14):emptyInputSignup(,Michaelnduemich...', 'Preezy', '123', '123') #1 {main} 投入 C:\xamp\htdocs\AnotherLoginSystem\includes unctions.inc.php 第 3 行

这是我的代码

<?php
   
function emptyInputSignup($name, $email, $username, $pwd, $pwdRepeat) {
    $result;
    
    if (empty($name) || empty($email) || empty($username) || empty($pwd) || empty($pwdRepeat) {
            $result = true;
    } 
    else {
        $result = false;
    }
    return $result;
}
    
function invalidUid($username) {
    $result; 

    if (!preg_match("/^[a-zA-Z0-9]*$/", $username)) {
        $result = true;
    }
    else {
        $result = false; 
    }
    return $result;
}
php function fatal-error
© www.soinside.com 2019 - 2024. All rights reserved.