use the headers
header("Content-Length: ".filesize($filepath));
header("Content-type: application/octet-stream");
header("Content-disposition: $attachment filename={$newfile}");
header("Content-Transfer-Encoding: binary");
readfile($filepath);
bastien
From: "Adil" <[EMAIL PROTECTED]>
To: [EMAIL PRO
2004 2:52 PM
> To: Gryffyn, Trevor
> Subject: RE: [PHP-DB] folder creation in php
>
>
>
> you need to send headers to tell the os what the page is like
> mime type etc. look on the PHP documentation
> -Original Message-
> From: "Gryffyn, Trevor" <[E
This is what I use to force a download:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Type: $type");
header("Content-Disposition: attachment; filename=".basename($
The browser will automatically do this when you click on a link to a
file that the web browser knows as a file that you download versus HTML
or text being sent to the browser where it's just displayed instead of
triggering the download prompt.
Maybe that doesn't make much sense.. My head's a bit f