prova cosi speriamo funzioni![]()
Codice PHP:
<?php
$var1=$_POST['var1'];
if (!$p_file = fopen("example.txt","r")) {
echo "Spiacente, non posso aprire il file miofile.txt";
} else {
while(!feof($p_file))
{
$linea = fgets($p_file, 255);
$linea=trim($linea);
$linea=strtolower($linea);
$linea=str_replace(" ","_",$linea);
$row[]= "$linea";
}
fclose($p_file);
}
if(in_array($var1,$row))
{
echo "trovato";
}
else
{
echo "non trovato";
}
?>