我的页面的参数错误


Argument error for my pages

我在第一页中遇到了这个问题,我不知道如何解决,请帮助我

Warning: Missing argument 1 for isblockedip(), called in /home/u425835176/public_html/shad0w.php on line 174 and defined in /home/u425835176/public_html/core.php on line 4715

功能

function isblockedip($var)
{
    $text = $_SERVER['REMOTE_ADDR'];
    $rez = mysql_query("SELECT * FROM lib3rtymrc_blockedip");
    $i=0;
    while($row=mysql_fetch_array($rez))
    {
        $var[$i]=$row[1];
        $i++;
    }  
    $result = count($var);
    for ($i=0;$i<$result;$i++)
    {
        $ausg = stristr($text, $var[$i]);
        if(strlen($ausg)>0)
        {
            return true;
        }
    }
    return false;
}  

在shad0w.php 中

if(isblockedip())
    {
////here comes the message
}`
if(isblockedip()) 

缺少参数$var
称之为if(isblockedip($var))

在调用函数时传递一个变量:

if(isblockedip($somevar))

或者在函数声明中给$var一个默认值:

function isblockedip($var = array())

在函数块中,$var是一个数组,因此在shad0w.php中,可能存在函数isblockedip可能需要的某种数组。

如果从未将预先存在的数组传递给isblockedip,则将函数delcaration更改为:

function isblockedip()
{
$var = array();

如果您的"问题"是警告,解决方案如下:

函数isblockedip($var)应为参数$var,但不使用变量调用此函数:isblockedip()是什么导致Warning: Missing argument 1 for isblockedip()...[..]