[請益] 二種HEADER INFORMATION併存
我的目標是使用者SUBMIT後,將處理結果以文字檔直接輸出給用戶。
如果我輸出完檔案,如果再顯示表單,那表單會一併進到文字檔中。
請問,有可能在檔案輸出(僅$s內容)後,再輸出HTML(顯示在browser中)嗎?
<?php
$s = mysql_escape_string($_POST['s']);
header ('Content-Type: application/octet-stream');
header ('Content-Disposition: attachment; filename="test.ids"');
echo $s;
?>
/*--- A ---*/
<form action = "" method = "post">
<input type = "text" name = "s">
<input type = "submit" value = "test">
</form>
--
http://averywu.pixnet.net/blog/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.251.237.155
→
10/01 00:15, , 1F
10/01 00:15, 1F
→
10/01 02:56, , 2F
10/01 02:56, 2F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章