Re: Sending Download Header
| From: | Bojan Gajic | Date: | Sun, 28 Jan 2001 12:21:51 +0000 |
| Subject: | Re: Sending Download Header | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37138@lists.php.net to get a copy of this message | ||
$file_name is just a name that scripts offers to the users in 'save as' dialog.
If you want to let them download a 'real' file, you have to use
fopen()/fpassthru() (or anything else you can think of, in order to open a file
and print it's content)
and fopen can take URL as an argument.
HTH,
Bojan Gajic
WreckRman2 wrote:
> When doing this does the $file_name have to be in the current directory or
> can it be a URL?
>
> ----- Original Message -----
> From: Bojan Gajic <bojan@inet.co.yu>
> To: Natasha <natashaklej@yahoo.com>
> Cc: <php-general@lists.php.net>
> Sent: Saturday, January 27, 2001 2:13 PM
> Subject: Re: [PHP] Sending Download Header
>
> >
> > header("Content-Disposition: attachment; filename=$file_name");
> > header("Content-Type: application/octet-stream"); file://or any other MIME
> type
> > ....
> > echo "Content";
> >
> > HTH,
> > Bojan Gajic
> >
> >