-2

我尝试将一个函数作为父函数,但出现此错误:

unexpected 'static' (T_STATIC), expecting identifier (T_STRING) 

我有 PHP v5.4.7 这是代码

public function static tableExist($table, $db)
    {
        $tables = mysql_exists($db);
            while(list($temp) = mysql_fetch_array($name, $pass))
            {
                if($temp = $table)
                {
                    return TRUE;
                }
                else
                {
                    return FALSE;
                }
            }

    }

和用法

if(register::tableExist(users, webshop));
                {
                    echo "succes";
                }
4

1 回答 1

1

尝试public static function tableExist

编辑:你有具体的线路参考吗?

于 2012-12-07T23:38:03.260 回答