$jieshaos=file(jieshaos.txt");//读取文本文件jieshaos.txt内容存入函数$jieshao (此时为数组)

$jieshaoc=count($jieshaos);// 获取数组个数

$jieshaor=rand(1,$jieshaoc);//生成 1到数组个数最大值的数字

$jieshao=@$jieshaos[$jieshaor]; 获取下标值

echo "$jieshao";

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2022-12-23
  • 2021-12-26
相关资源
相似解决方案