Page 1 of 1
[SOLVED] Link Question
Posted: Sun Jun 19, 2005 12:43 pm
by Sphen001
Hi,
I am developing an application where I need to be able to access files on my computer. This I can manage. By typing is something like:
Code: Select all
file://I://Documents%20and%20Settings
I can get there with no problems. However, when I use it as a hyperlink:
Code: Select all
<a href="e;file://I://Documents%20and%20Settings"e;>Test</a>
The link location in the status bar says
Code: Select all
file:///I://Documents%20and%20Settings
For some reason, the browser adds an extra / into the link. It happens both when I use HTML, and when I echo the same thing via PHP. Also, I am using FireFox. I haven't tried using IE yet.
Does anyone know why this would be happening?
Thanks for any input,
Sphen001
Posted: Sun Jun 19, 2005 12:55 pm
by lamia
Have you tried doing this...
Code: Select all
<a href="e;I://Documents%20and%20Settings"e;>Test</a>
And by the way... I dunno is simple hyperlinks can be classified as an application...
Posted: Sun Jun 19, 2005 12:56 pm
by Sphen001
Hi,
I've tried that, and it didn't work.
And BTW, this is just a tiny part of what I'm doing.
Thanks,
Sphen001
Posted: Mon Jun 20, 2005 7:02 am
by Sphen001
bump
Posted: Mon Jun 20, 2005 7:46 am
by Syranide
Code: Select all
<a href="file://I://Documents%20and%20Settings">Test</a>
should first of be
Code: Select all
<a href="file://I:/Documents%20and%20Settings">Test</a>
and you should try
Code: Select all
<a href="file://I:\Documents%20and%20Settings">Test</a>
(no escaping) as I think it slashes the first protocol since you used another colon (followed by a slash).
Can't say for sure, but try it, can't test it myself right now.
Re: Link Question
Posted: Mon Jun 20, 2005 10:44 am
by senthilnayagam
Absolute file links are generally required for file operations only
i dont think it is a right coding practice to give file links, as this may work only on some operating system and not on others
please serve the file from the webserver, and provide a proper hyperlink, relative or absolute, this will help you porting the app when your site needs to grow.
regards
Senthil
Posted: Mon Jun 20, 2005 7:34 pm
by Sphen001
Hi,
Thanks for the replies.
Syranide: What you posted is what I tried, however, FireFox added an extra slash in there for some reason. I'll try your second suggestion though.
senthilnayagam: I can't put these files on the webserver. I am trying to write an application that will store file info in a DB, and allow people on my LAN to transfer it to their computer. (I know I could do this other ways, but I want to see if I can do it this way).
Thanks again.
Sphen001
Posted: Tue Jun 21, 2005 7:21 am
by Chris Corbyn
Sphen001 wrote:I can't put these files on the webserver. I am trying to write an application that will store file info in a DB, and allow people on my LAN to transfer it to their computer. (I know I could do this other ways, but I want to see if I can do it this way).
Could you elaborate on this please? Sound like <input type="file"... > could be what you need.
Side note: Not sure FF works with filesystem links.... (IE should though)