日期:2014-05-17 浏览次数:20560 次
$fp = fopen('filename', 'r'); $num = 0; $s = ''; while($ch = fgetc($fp)) { if($ch == '$') { $num++; if($num > 2) break; }elseif($num == 2) $s .= $ch; } echo $s;