note 22883 added to function.header
| From: | krynix at wp dot pl | Date: | Wed, 03 Jul 2002 10:12:43 +0000 |
| Subject: | note 22883 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32537@lists.php.net to get a copy of this message | ||
Please help, those scripts above dont work.. :(
my site:
http://krynix.com/mp3
uses
the "download.php" file listed below
<?php
header("Cache-control: private");
header("Content-Type: application/mp3");
header("Content-Disposition: attachment;
filename=http://krynix.com/mp3/files/$file");
?>
it should work... but the result is always: empty (0 bytes) "download"
file without any extension
i also tried:
header("Content-type: application/octet-stream");
header("Content-Disposition: filename=http://krynix.com/mp3/files/$file"
."%20");
and other variations of that script... and always the same
Links are OK - when i use
header("Location: http://krynix.com/mp3/files/$file");
it works but it always opens the file with quicktime or winamp which is
unwanted because i want to save the file :(
do you know what could be wrong ??
the script doesn't work on IE 5.0 and 6.0
Best Regards
Krynix
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+22883
http://master.php.net/manage/user-notes.php?action=delete+22883
http://master.php.net/manage/user-notes.php?action=reject+22883