Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 3rd, 2004, 09:41 AM
Registered User
Join Date: Jun 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open a File on the Server

I need to open a file (pdf) for viewing from a PHP page. I have the filenames stored in a DB, and printed out in a list for customers to select which PDF they wish to view. So they need to be able to click on a link, and that file to open for viewing. Any help?

Reply With Quote
  #2 (permalink)  
Old May 3rd, 2004, 08:20 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

I'm not sure I understand the mystery. Are these pdf files generated by PHP or stored in a database?

If they're plain-old pdf files all you need to do is output the file path to a hyperlink.

<a href='some/path/file.pdf'>The pdf file</a>

If the browser understands pdf files it'll try and display it, if not it'll prompt the user for download. If Acrobat Reader is installed, Internet Explorer can display pdf files natively. Mozilla is capable of this as well.


The Spicy Peanut Project
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open a file in another server from SP Andraw SQL Server 2005 0 August 14th, 2008 10:20 AM
open image file from client then save to server hendyhanusin ASP.NET 1.0 and 1.1 Basics 11 March 22nd, 2007 07:28 AM
Open the "Open File" dialogue box piratelordx Access VBA 4 March 14th, 2006 10:08 PM
Can We open database in different server? por Classic ASP Basics 0 December 18th, 2005 09:25 PM
SQL Server cannot open Jane SQL Server 2000 5 December 30th, 2004 01:57 AM

All times are GMT -4. The time now is 05:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.