You are here: Re: displaying a file not in the webroot « PHP Programming Language « IT news, forums, messages
Re: displaying a file not in the webroot

Posted by Good Man on 01/11/08 19:12

firewoodtim@yahoo.com wrote in news:1pbfo3dbejpknghjlf35okvtppvk7g9j7b@
4ax.com:

> Good Man,
> Thanks for the info, but I'm still a bit confused.
> What is the html that needs to be generated to enable launching the
> file in a target="_blank" window, and how do I get the data into it?
>
> If the file had been under webroot, I could have just referenced the
> file directly, as:
> <a href="?images/MyFile.pdf" target="_blank">MyFile.pdf</a>
>
> Now I have to put an "echo $buffer" in that new window somehow. Can I
> do it with the anchor, or do I need to write some javascript to call a
> new window, or is there some other method that will be better?
>

Presumably you could just do

<a href="streamFile.php?fileID=xxxxx" target="_blank">MyFile.pdf</a>


.... where streamFile.php first checks the fileID against a database,
determines its name and location on the server, and does it's thang.

 

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

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