如果我注释掉它打印文件的if语句,为什么这段代码不起作用。
<?php
$f = fopen("test.txt", "r");
// Read line by line until end of file
while(!feof($f)) {
$arrays = explode("\n",fgets($f));
foreach($arrays as $words){
if($words == "andersmarkc"){
echo $words;
}
}
}
fclose($f);
?>