php把⽹页保存成txt的函数,web页⾯⽣成TXT⽂件供另存为下
载
header("Content-Type: application/octet-stream");
$quan=$_GET['quan'];
$ua = $_SERVER["HTTP_USER_AGENT"];
$filename = "";
$encoded_filename = urlencode($filename);
$encoded_filename = str_replace("+", "%20", $encoded_filename);
if (preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']) ) {
header('Content-Disposition: p_w_upload; filename="' . $encoded_filename . '"');
} elseif (preg_match("/Firefox/", $_SERVER['HTTP_USER_AGENT'])) {
/
/ header('Content-Disposition: p_w_upload; filename*="utf8' . $filename . '"');php手机版下载
header('Content-Disposition: p_w_upload; filename*="' . $filename . '"');
} else {
header('Content-Disposition: p_w_upload; filename="' . $filename . '"');
}
echo '您已领取100元现⾦券。现⾦券编码是:'.$quan;
web页⾯⽣成TXT⽂件供另存为下载
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论