Return to Snippet

Revision: 8362
at September 16, 2008 21:16 by lzyy


Initial Code
if ($_POST['content']) {
    header ("Content-type: octet/stream");
    if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE")) {
        header("Content-Disposition: filename=tmp.php"); // For IE
    } else {
        header("Content-Disposition: attachment; filename=tmp.php"); // For Other browsers
    }
    echo $_POST['content'];
    exit;
}

Initial URL
http://bbs.blueidea.com/viewthread.php?tid=2833839

Initial Description


Initial Title
捕获输出,另存为文件

Initial Tags


Initial Language
PHP