Hi,
I have text files/notes/pdfs etc in a folder that I want the names of to appear on one of my php pages and then I want the doc/pdf to appear in a seperate browser window (or the same window) when the user clicks on the name. Is this possible using PHP? I have some code to open images like this but beyond that I'm finding it hard to get any information/code.

If anyone knows anything about this or have some code examples or even a link it would be appreciated.
Thanks
Sean

it's possible to do this in HTML, no need to do this in html, when you make the link simple add a target="_blank" in the anchor text
here is an example:

open link in a <a href="http://www.daniweb.com/" target="_blank">new window</a>

as far as I know there is no way to do this in PHP, but who cares, html is better in this situation

it's possible to do this in HTML, no need to do this in html, when you make the link simple add a target="_blank" in the anchor text
here is an example:

open link in a <a href="http://www.daniweb.com/" target="_blank">new window</a>

as far as I know there is no way to do this in PHP, but who cares, html is better in this situation

Thanks for the reply. Still having problems getting this code to work though.
So if I wanted to open a txt file called "rte.txt" in a folder called "upload" that is in the same directory as my html page would the code be:

<p>
open link in a <a href="./upload/rte.txt" target="_blank">new window</a>
</p>

Cheers,
Sean

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.