原PHP实现文件断点续传下载
PHP实现文件断点续传下载
<?php //PHP 断点续传下载 function download($fileurl, $start = 0, $end = '') { $task_sourcefile = '/path/downfile.mp4'; //本地保存的文件 $sourceurl = $fileurl ; //要下载的远程文件 $tokenfile = 'downfile.token'; $isfileexist =$this->check_remote_file_exists($sourceurl); if (!$isfileexist) { $isfileexist2 =$this->check_remote_file_exists($sourceurl); if (!$isfileexist2) { throw new \Exception('远程文件不存在'); } }…
近期评论