02.txt文本中就一行显示是hello<?php
$f_open = fopen ( "../02.txt","r" );
if ( !$f_open )
echo "不能打开文件!";
while (false !== ($chr = fgetc($f_open)))
echo $chr;
fclose ( $f_open );if($chr == "hello"){
echo success;
}else{
echo fail;
}但是比较都是fail,认为是不相等,用===也是