You are here: Re: File Download NOT open « PHP Programming Language « IT news, forums, messages
Re: File Download NOT open

Posted by Jerry Stuckle on 09/13/06 14:42

jerryyang_la1@yahoo.com wrote:
> I have a php page that reads files links from a Database.
> This works well, but when we click on the link the file starts to open.
>
> Is there anyway to force the file to SAVE not open ??
>
> thanks
>

Jerry,

You can't force them to save it. That's up to the browser settings the
user has entered, and you can't override those (which is a good thing).

As Erwin indicated, if you are actually generating the files in PHP
code, you need to set the headers appropriately. But if all you're
doing is pointing to an existing file on the server, the server itself
should set the appropriate header.

They can always right click on the link and select "Save Link..." (exact
wording depends on the browser). I'd recommend you add a note to the
effect "To save the file, click your right mouse button on the link and
select Save".

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация