随机本地词典内容,随机一行文本输出
<?php //获取句子文件的绝对路径 $file = file($yiyanPath."yiyan.txt"); //随机读取一行 $arr = mt_rand( 0, count( $file ) - 1 ); $content = trim($file[$arr]); echo $content; ?>标签:输出,php,随机,接口定义,文言文,词典 From: https://www.cnblogs.com/whwa/p/17322132.html
随机本地词典内容,随机一行文本输出
<?php //获取句子文件的绝对路径 $file = file($yiyanPath."yiyan.txt"); //随机读取一行 $arr = mt_rand( 0, count( $file ) - 1 ); $content = trim($file[$arr]); echo $content; ?>标签:输出,php,随机,接口定义,文言文,词典 From: https://www.cnblogs.com/whwa/p/17322132.html