Unnamed
public text v1 · immutable function findLine($file, $string){
$fres = @fopen($file, 'r');
if($fres){
while(!feof($fres)){
$buffer = fgets($fres, 4096);
if( stripos($buffer, $string) ){
echo $buffer, '<br />';
}
}
fclose($fres);
} else{
echo '<p style="color: red;">WARNING: File ', $file, ' could not be opened.</p>';
}
}