输出文本里面的远程视频链接代码如下<?php function read(...$filelist) { $list = []; foreach ($filelist as $file) { $handle = fopen($file, 'r'); while (($line = fgets($handle)) !== false) { array_push($list, trim($line)); } fclose($handle); } return $list; } $list = read('mp4.txt'); $url = $list[array_rand($list)]; header("Location: {$url}");输出文件夹里面的本地视频代码如下<?php $mp4_array = glob("mp4/*.{mp4}",GLOB_BRACE); $mp4 = array_rand($mp4_array); header("location:$mp4_array[$mp4]"); ?>有任何问题评论区留言