Computing.Net > Forums > Web Development > SN R U out there? (PHP help)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SN R U out there? (PHP help)

Reply to Message Icon

Name: dave c
Date: February 1, 2005 at 09:28:19 Pacific
OS: Windows 2003 server
CPU/Ram: varies
Comment:

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=./B

and 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.fil

It'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!



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: February 1, 2005 at 19:24:43 Pacific
Reply:

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


0

Response Number 2
Name: dave c
Date: February 3, 2005 at 04:45:33 Pacific
Reply:

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!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Flash links NETvir what the heck?!



Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: SN R U out there? (PHP help)

to any emplyers out there: a questi www.computing.net/answers/webdevel/to-any-emplyers-out-there-a-questi/1828.html

Remote Upload Script www.computing.net/answers/webdevel/remote-upload-script/3730.html

Putting a database on my forum... www.computing.net/answers/webdevel/putting-a-database-on-my-forum/2837.html