ha as Posted January 19, 2007 Share Posted January 19, 2007 HiI created a MySQL database with all the pdf papers on my HD. The path to a pdf file is stored on my HD e.g. D:\Docs\Papers\Berg2003a.pdfIn php I do the query and output the link:echo "<a href='file://" $row->pdf ."'>pdf</a>";But when the page is generated and I click on it nothing happens. If I do right click, copy link and paste it in the browser field, the pdf file opens though! Looking at the html code, it reads in Firefox: <a href="file://D:%5CDocs%5CPapers%5Cwind03%5Cpdfs%5Berg2003a.pdf">pdf</a>and in IE6 <a href='file://D:\Docs\Papers\wind03\pdfs\Berg2003a.pdf'>pdf</a>I have also tried .str_replace('\\','/',$row->pdf) but with the same result.Hope somebody can help here...Thanks Link to comment https://forums.phpfreaks.com/topic/34857-links-created-in-php-to-pdf-files-dont-work/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.