作者averywu (看文不要只会用横的看)
看板PHP
标题[请益] 二种HEADER INFORMATION并存
时间Mon Sep 30 22:08:04 2013
我的目标是使用者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
1F:→ MOONRAKER:请用javascript多开一窗输出文字档。 10/01 00:15
2F:→ danny8376:如果不用JS也可以挂iframe 总之分开让客户端载入 10/01 02:56