💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
参考 ``` 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; } ```