Swoole\Request::download PHP Méthode

download() public méthode

发送下载声明
public download ( $mime, $filename )
    function download($mime, $filename)
    {
        \Swoole::$php->http->header('Content-type', $mime);
        \Swoole::$php->http->header('Content-Disposition', "attachment; filename={$filename}");
    }