-1

私は joomla (tp_whois) 用のモジュールを持っています。

警告: preg_match() [function.preg-match]: 89 行目の /home/carfaja/public_html/components/com_tpwhois/classes/domains.php に終了区切り文字 '^' が見つかりません

89 行目のコードを確認します。

// check format
    if (!preg_match("^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]+$", $domain))
        $this->CORE->ERROR->stop("domain_badformat");

そして、エラーを見つけることができません。

私を助けてください。ありがとう

4

1 に答える 1

0

正規表現の区切り文字がありません

!preg_match("^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]+$"

する必要があります

!preg_match("~^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]+$~"

また

!preg_match("/^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]+$/"

またはあなたが選択した任意の区切り

于 2013-11-12T20:58:39.847 に答える