PHP 读取TXT文本问题我想读取a.txt中第二个$,到第三个$之间的数据怎么弄谢谢了!!! [解决办法]
$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;