| | |
Opening files on a browser
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2006
Posts: 12
Reputation:
Solved Threads: 0
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
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:
as far as I know there is no way to do this in PHP, but who cares, html is better in this situation
here is an example:
PHP Syntax (Toggle Plain Text)
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
•
•
Join Date: Feb 2006
Posts: 12
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by paradox814
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:
PHP Syntax (Toggle Plain Text)
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
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
![]() |
Similar Threads
- XP explorer slow opening files (Windows NT / 2000 / XP)
- Is MAC OS capable of opening HTML files? (Mac Software)
- All .exe files need another program to open them??!! (Windows 95 / 98 / Me)
- Trouble opening certain files... (Windows 95 / 98 / Me)
- Browser hijacked - returns every time I Start (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: Not sending Feedback Form
- Next Thread: page doesnt load in opera and warning to IE users doesnt show help please?
| Thread Tools | Search this Thread |
ajax apache api array back basic beginner binary broken cakephp checkbox class cms code computing cron curl customizableitems database date delete display dynamic echo email error external file files filter folder form forms function functions gc_maxlifetime google host href htaccess html iframe image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm multiple mysql navigation oop parsing paypal pdf php problem query question radio random recursion regex remote script search server sessions sms snippet soap source space sql syntax system table thesishelp trouble tutorial update upload url validator variable video web xml youtube





