Posted by Matt Walker on 02/27/06 11:42
I decided to flesh out my php skills by building a web application
which could scan through local files on my intranet (specifically
mapped drives on my server) and generate a list of Movies or pictures
or music, etc. Which worked fine, I created the code to do that and to
store the results in a mysql database. I can even print it out to a
..php page and sort it however I like.
What I can't seem to do is to create links to the data I've indexed in
a way that will let me open them from the generated php page. I've
searched and searched and there just doesn't seem a way to do this.
I'm pretty sure I've exhausted the obvious options.
The following trials did not work when the document was served from an
apache web server.
<?php
echo "<h1><a href=file:///c:/temp.txt> HEY </a></h1>";
echo "<h1><a href=file:///c:\temp.txt> HEY </a></h1>";
?>
<a href=file:///c:\temp.txt target="_top"> temp.txt </a>
<a href=file:///c:/temp.txt target="_top"> temp.txt </a>
When the same page was loaded directly from the file instead of served
through apache the bottom two links worked. This doesn't really help
me however. I need to be able to dynamicly generate pages that link to
the files.
I've read that browser security is the restricting factor in this but
changing all of my security settings in IE to low didn't seem to affect
it (not sure what the equivalent of security settings is in Firefox).
Does anyone know of a way to link to local files directly in a way that
lets you open them directly from the source instead of by downloading
them to a temp file or saving the file to somewhere locally? Is it
even possible in PHP?
Any help would be much appreciated.
Matt Walker
Navigation:
[Reply to this message]
|