use php to open a pdf file on my hard drive
Posted 24 June 2006 - 10:41 PM
I am trying to make a page that helps me open files on my computer. The thing I would like to do is to automatically open a file on my harddive by using some dropdown boxes and text fields in a form. Can anyone help?
Posted 25 June 2006 - 02:27 AM
Posted 25 June 2006 - 02:48 AM
If you're doing from the same computer, you could use the file:/// protocol, I think.
If it's on a remote server, you would have to add the directory where the .pdf as an alias into the webserver config. say as /pdf/, (make sure to password protect it though ). Then you could link to it either on Windows: file:///C:\Documents%20and%20Settings\Fred\My%20Documents\PDFs\mypdf.pdf or Linux/Unix: file:///home/fred/mypdf.pdf (I'm not to sure about the Linux one, but I think the file protocol works, I haven't used Linux in along time) or you could use say [a href=\"http://www.mydomain.com/pdf/mypdf.pdf\" target=\"_blank\"]http://www.mydomain.com/pdf/mypdf.pdf[/a]
But, don't trust me completly, I haven't actually tried this before, I only thought about it in the past (I think about a lot of neat scripts, but never bother to make 'em )
Anyway, good luck!
Posted 25 June 2006 - 08:18 PM
[a href=\"http://mwbouwkamp.everywebhost.com/articles.php\" target=\"_blank\"]http://mwbouwkamp.everywebhost.com/articles.php[/a]
Posted 25 June 2006 - 09:02 PM
What are you expecting it do that "doesn't work"?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users