Re: implementing downloads with php?

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

 



On Thu, Apr 02, 2015 at 05:58:49PM -0700, Jeffry Killen wrote:
> When a web page or a resource like an image or javascript file, or css file
> "downloads" it is rendered in the browser. It does not appear as a separate
> file written to the users system. What I am looking for is what might be
> described
> as the opposite of uploading a file.
> 
> Thanks for responses
> JK

My suspicion was correct; you're looking to tell the browser that this
is a file to save rather than a file to display. This is accomplished
with headers, which the browser interprets as hints (not commands, as it
is free to ignore them) for what to do with a given page.

A quick google turned up this result:

http://stackoverflow.com/questions/8485886/force-file-download-with-php-using-header

See if that helps.

--Sean

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