Code : Tout sélectionner
$existe = FALSE;
@ $fp = fopen(FICHIER, 'r') or die('Ouverture en lecture de "' . FICHIER . '" impossible !');
while (!feof($fp) && !$existe) {
$ligne = fgets($fp, 1024);
if (preg_match('|\b' . preg_quote($key) . '\b|i', $ligne)) {
$existe = TRUE;
}
}