多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
参考 ``` public function download_file($url,$showname){ $file_name = $_GET['file']; $file_url = 'http://www.remote.tld/' . $file_name; header('Content-Type: application/octet-stream'); header("Content-transfer-encoding: Binary"); header('Content-Disposition: attachment; filename="' . $showname.'.mp4' . '"'); readfile($file_url); exit; } ``` 修改后 ``` /** * @param $url 视频路径 * @param $showname 显示下载的视频名称 * @return int|string */ public function download_file2($url,$showname){ $file_url = $url; header('Content-Type: application/octet-stream'); header("Content-transfer-encoding: Binary"); header('Content-Disposition: attachment; filename="' . $showname.'.mp4' . '"'); readfile($file_url); exit; } ```