NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Path to files on local drive


Joined: 23 Oct 2009
Posts: 3
Reply with quote
I hope someone can shed some light on this for me...

I'm trying to create a program that will let the end user (members of our service) view our manuals and bulletins in PDF form. Some people copy it to the hard drive and some run it from the DVD drive so I have to use a variable to point to where the files are. I am using a PHP include to set the variable and everything works fine if the PDF files are in the "web" folder. My problem is the files are not always going to be there, if the person wants to access the files from the DVD drive I need to set the path to that drive letter and it does not seem to work. This is what i tried maybe someone can tell me what im doing wrong. Here it is without the variable, the files are in the folder on the local drive C for this example...

<tr>
<td width="100%" align="left" class="row1" style="cursor:hand; padding: 5px;
" onclick="window.location.href='c:/DVD/GM BULLETINS/86-12.pdf'
" onMouseOver="this.style.backgroundColor='00ccff'
" onMouseOut="this.style.backgroundColor=''"><strong>86-23 FRONT SEAL POP OUT</strong></td>
</tr>


What should I use for the href?
Thanks
Ed
View user's profileFind all posts by kriptoSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Adding file:// (as you would http://) might work for the href. Example:

window.location.href='file://C:/DVD/GM BULLETINS/86-12.pdf'

Hope this helps Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 23 Oct 2009
Posts: 3
Reply with quote
Tried that but it still will not go outside the DocumentRoot... Any other suggestions?

Thanks
Ed
View user's profileFind all posts by kriptoSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
It may be a limitation (security?) of PhpDock, I don't know. Entering a URL in that format in your web browser should work fine though.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 23 Oct 2009
Posts: 3
Reply with quote
Yes if i enter it directly in a browser it works fine and I agree it seems to be a security issue with PHPDock. Is there any way around it? Thanks for the help!

Ed
View user's profileFind all posts by kriptoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
tried this and it worked fine for me
Code:

<table>
<tr>
<td width="100%" align="left"
style="cursor:hand; padding: 5px;"
onclick="window.location.href='C:/1.pdf'"
onMouseOver="this.style.backgroundColor='00ccff'"
onMouseOut="this.style.backgroundColor=''">
<strong>86-23 FRONT SEAL POP OUT</strong></td>
</tr>
</table>

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Path to files on local drive
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic