文本随机取样 Posted on 2018-12-06 | In PHP 12345678$filename = $argv[1];$fd = fopen($filename, "rb");while($line = fgets($fd)) { if (rand(1, 7) == 1) { echo $line; }}fclose($rd); -------------本文结束感谢您的阅读------------- 坚持原创技术分享,您的支持将鼓励我继续创作! Donate WeChat Pay