What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Other PHP question...

Other PHP question...
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Other PHP question...
I think the simplest thing to do is put a slash (and a path, if necessary) before the file name (index.php). For example, this file has a link to "/index.php" and it will link to http://shoutbox.menthix.net/index.php no matter what folder it's in...

http://shoutbox.menthix.net/files/testing.html

quote:
Originally posted by leito.gt
echo $_SERVER['DOCUMENT_ROOT'] 
// But DOCUMENT_ROOT will echo the complete path, and not just the folder.
You should try this instead: dirname($_SERVER['PHP_SELF'])

If you're running the script http://site.com/files/images/index.php, that code will return "/files/images"

This post was edited on 06-21-2004 at 04:19 AM by WDZ.
06-21-2004 04:11 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Other PHP question... - by leito on 06-20-2004 at 11:07 PM
RE: Other PHP question... - by WDZ on 06-21-2004 at 04:11 AM
RE: Other PHP question... - by leito on 06-21-2004 at 04:45 AM
RE: Other PHP question... - by KeyStorm on 06-21-2004 at 01:51 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On