打印/下载
使用

引入

use app\library\Down;

Blob 二进制文件下载


private static $dirRoot = 'upload/';

function downFileAction(){
  // 参数
  $path = $this->request->get('path','string');
  $filename = $this->request->get('filename','string');
  if(empty($path) || empty($filename)) return null;
  // 文件流
  return Down::fileBlob(self::$dirRoot.$path,$filename);
}
{{copy}}