php函数随机读取txt文本中的一行
function getline($file){
$i=0;
do{
$data = file($file);
$num = count($data);
$id = mt_rand(0,$num-1);
$shuju_text = chop($data[$id]);
$i=strlen($shuju_text);
}
while ($i<1);
return $shuju_text;
}
浙公网安备 33010602011771号