Re: Saving Files
| From: | Bogomil Shopov | Date: | Wed, 05 Jan 2005 12:51:58 +0000 |
| Subject: | Re: Saving Files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205665@lists.php.net to get a copy of this message | ||
Hello
Yes you can do that. Please follow the steps:
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="downloaded.pdf"');
readfile('original.pdf');
Bogomil
http://purplerain.org
prthomp@uark.edu wrote:
> Hi all.
>
> Note, this may be a bit off topic.
>
> With that said... I am wanting to save a file off my website to a certain location on my
> computer. Is there a way to click on a button (or something) and that invokes the download, which
> then saves to (for example) C:\SomePlace\Directory\Pizza\sausage.txt?
>
> The whole process:
> 1. User uploads from a specific location (that I already know)
> 2. Modifies the file via the web
> 3. Saves/downloads the file to that exact location as pulled from and replaces the old file
>
> It seems as though this can be done but I have not found a way to do it, and I have searched a
> lot. Any thoughts on how to?
>
> Thanks in advance,
> ~Philip