Re: Saving Files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux