随机读取txt每行的内容
<?php
// 读取文件内容到数组
$contentArr
= file(
'filename'
);
//总行数
$totleLines
=
count
(
$contentArr
);
//随机行数
$current
= rand(1,
$totleLines
);
//随机的内容输出
echo
"<td><a href=\"$contentArr[$current]\">$contentArr[$current]</a></td>"
;
?>