-1
function processAvailable($used_limit)
{
    // determine matching type
    if (strpos($this->CORE->CONFIG->NAMESERVERS[$this->server][($used_limit ? "limit_keyword" : "keyword")], "!!!") === 0)
    {
        $opposite = true;
        $keyword = substr($this->CORE->CONFIG->NAMESERVERS[$this->server][($used_limit ? "limit_keyword" : "keyword")], 3);
    }
    else
    {
        $opposite = false;
        $keyword = $this->CORE->CONFIG->NAMESERVERS[$this->server][($used_limit ? "limit_keyword" : "keyword")];
    }


    // determine if available
    if (preg_match($keyword, $this->whoisData))
        $this->available = !$opposite;
    else
        $this->available = $opposite;
}

第 336 行是preg_match当我将分隔符放在limit_keyword参数顶部的位置,因为/limit_keyword/我收到以下错误;

中的空正则表达式C:\xampp\htdocs\whois\classes\engine.php on line 336

请帮忙

4

1 回答 1

2

的值$keyword不是有效的正则表达式。另外,我认为无论如何在这种情况下这都是矫枉过正。您可能应该使用stristr()

if (stristr($this->whoisData, $keyword)) // <-- notice the reversed needle and haystack
于 2013-03-26T12:57:10.220 回答