function download($mime, $filename) { \Swoole::$php->http->header('Content-type', $mime); \Swoole::$php->http->header('Content-Disposition', "attachment; filename={$filename}"); }