Come da topic, como trovo una stringa in un file così da poter leggere tutta la riga associata?
Come da topic, como trovo una stringa in un file così da poter leggere tutta la riga associata?
Codice PHP:
$handle = fopen("$file", "r");
while (!feof($handle))
{
$buffer = fgets($handle, 4096);
if (strpos($buffer, "testo da cercare") != 0)
{
/*istruzioni da fare*/
}
}
fclose($handle);