2013-07-01 33 views
-1

我想更換eregi()聲明和使用preg_match這個代碼,但不`噸知道怎麼辦。你能幫我麼?PHP:更換eregi()

while ($elemento = $dir->read()) 
{  
    // Evitamos el . y ... 
    if (($elemento != '.') and ($elemento != '..')) 
    { 
     // Vemos si Existe el Archivo 
     if (eregi($buscar, $elemento) AND is_file($ruta.$elemento) ) 
     { 
      echo " Archivo : $elemento <br>"; 
     } 


    }  
}  
+0

http://php.net/manual/en/reference.pcre.pattern.posix.php – deceze

+0

還有的甚至沒有足夠的代碼,以真正幫助你。我們看到有兩個變量來'eregi'通話。有什麼問題你已經轉換,要使用'preg_match'? – deceze

回答