Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
SN, I need your help again! For all others, please preview this post: http://www.computing.net/webdevel/wwwboard/forum/1252.html
Bottom line: SN showed me a PHP script that will browse the files in a network, and make a web page that has links to all those files. That way I can (for example) have a user simply save the new version of the new Newsletter into a shortcut on her desk, and the intranet will automatically be updated because there is a link to a PHP file in that target folder, and it genererates links. No more updating the intranet site!
I was concerned about making new folders, so he modified it, and it worked, I tested it by looking at the web page on one computer, and on the server creting a new folder, copying some files into it, and sure enough they displayed as links.
However, now I see that it isn't quite, right, the links don't work.
Folder A has five files in it... 1.fil, 2.fil, 3.fil, 4.fil, &5.fil, it also has one folder in it, Folder B.
Folder B has 3 files in it... 1.fil,7.fil,9.fil...
When I browse to folder A and click on any of the files, they open just fine. If I click on Fodler B, it displayes the links to 1,7,9. But at the top of the page, the web address says:
http://servername/A/contents.php?dir=./Band it lists the files in folder B. If I look at the link for the files (1,7,&9), however, and go to it's properties, It says:
http://servername/A/7.filIt's like the file is AN folder A, peeking into Folder B, telling me what is in Folder B, but when I want to actually open something, it looks for it in A
When I tested it, like I said I merely copied files, they were in both the parent AND the child folders, so when I tested, the files opened correctly, but only because there were two copies, and it was opening the wrong one.
I need this file to understand that when I click on the link to go to another folder, that folder is the source of the files that I want to pull from.
Any ideas?
(I'm putting "contents.php" in all of the folders, maybe if we could program it to, when clicking on a directory link to go to a new folder, go to the NEW contents.php instead?
I hope I'm not making a jumble of things, I know exaclty what's happening, and even why, I just don't know enough to rewrite it!

Hi Dave-
Whoops...Little typo there. The last line should be:print "<A .href='$source_dir/$file'>$file<.BR>";
I left out source_dir.
-SN

Holy crap I can't believe it was that simple LOL.
I actually tried putting in source_dir, but didn't put in the $
Thank you SO much!

![]() |
Flash links
|
NETvir what the heck?!
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |