ob_clean();
    header('Content-Type: application/pdf');
    header('Content-Disposition: attachment; filename="' . basename($path) . '"');

// header('Content-Disposition: inline; filename="file.pdf"');

    header('Content-Transfer-Encoding: binary');
    header('Accept-Ranges: bytes');
    readfile($path);
    exit;

标签: none

添加新评论