note 87679 added to function.header
| From: | lanky at iaclan dot com | Date: | Tue, 16 Dec 2008 16:03:28 +0000 |
| Subject: | note 87679 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148217@lists.php.net to get a copy of this message | ||
help with php/html
when i try using the header script for downloading a .csv file, my broswer IE7 or FireFox displays a
blank page and doesn prompt for an option to "SaveAs".
<?php
header('Content-Disposition: attachment; filename="downloaded.txt"');
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv; filename=" . date("Y-m-d") .;
header('Vary: User-Agent');
?>
<html>
<head>
<title>That was then, this is now</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<html>
code and stuff here
</html>
....please advise?
----
Server IP: 208.69.120.35
Probable Submitter: 12.163.55.2
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/87679
Del: integrated -- https://master.php.net/note/delete/87679/integrated
Del: useless -- https://master.php.net/note/delete/87679/useless
Del: bad code -- https://master.php.net/note/delete/87679/bad+code
Del: spam -- https://master.php.net/note/delete/87679/spam
Del: non-english -- https://master.php.net/note/delete/87679/non-english
Del: in docs -- https://master.php.net/note/delete/87679/in+docs
Del: other reasons-- https://master.php.net/note/delete/87679
Reject -- https://master.php.net/note/reject/87679
Search -- https://master.php.net/manage/user-notes.php