<?php
$a = 'grzn.txt';
if (strpos($a, 'word') !== false)
{
echo 'Found';
}
?>
How i check if the "word" is in the text file "grzn.txt" ? & thanks
You should search within a text content, not within file name.
Use file_get_contents function:
$a = 'grzn.txt';
if (strpos(file_get_contents($a), 'word') !== false) echo 'found';