'; header('Location:' . $filePath); exit; } } } } // 递归调用函数 function getMp4Urls($dir) { $files = scandir($dir); foreach ($files as $file) { if ($file != '.' && $file != '..') { $filePath = $dir . '/' . $file; if (is_dir($filePath)) { getMp4Urls($filePath); } else { if (pathinfo($file, PATHINFO_EXTENSION) == 'mp4') { echo $filePath . '
'; header('Location:' . $filePath); exit; } } } } } PHP 获取 MP4 目录下所有视频地址并跳转

原文地址: https://www.cveoy.top/t/topic/nmVu 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录