求助:时转换间戳的问题
很久没来村里了,现在小弟遇到了很棘手的问题,请教各位老大了:...
作者 lidm 发布于 0000-00-00 分类:php基础编程
在文本文件count.txt中有如下内容:
1,216.34.25.135
2,61.123.45.234
3,218.45.132.67
........
1002,218.7.161.66
如何用一段代码显示count.txt文件中的全部内容?
显示格式为:
1 216.34.25.135
2 61.123.45.234
3 218.45.132.67
........
1002 218.7.161.66
请各位指点,写出代码最好。首先表示感谢!
逛论坛交流:显示文本文件的问题
><?php
$filename = "count.txt";
$fp = fopen($filename,"r");
$contents = fread($fp,filesize($filename));
$contents = ereg_replace(","," ",$contents);
$contents = ereg_replace("
","
",$contents);
$contents = ereg_replace("
","",$contents);
fclose($fp);
echo "
";
?>";
echo "$contents ";
echo "
>太好了,正合我意,非常感谢!
2 条回复
回复