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:
leito
Senior Member
****

Avatar
Chameleon by KeyStorm

Posts: 720
Reputation: 5
38 / Male / –
Joined: Apr 2003
O.P. Wink  Other PHP question...
Hi all, working on a PHP file, I include a file, which has a link, let's say:

in a.php:

$a = '<a href="index.php">Index</a>';

and in all other files in the same directory:

include 'a.php';

But, when I have files in other folders I use:

include '../a.php';

but index.php is not in that folder and I get an error.


This was a simple explanation,  really need that file to be the only one with the link, so I can't just added in each page.
Is there any php function that detect in which folder the file is? In big, because that's the really question.

something like:

echo $_SERVER['DOCUMENT_ROOT'] 
// But DOCUMENT_ROOT will echo the complete path, and not just the folder.

The document root directory under which the current script is executing, as defined in the server's configuration file.


This post was edited on 06-20-2004 at 11:07 PM by leito.
[Image: leonelgalan.png]
06-20-2004 11:07 PM
Profile E-Mail PM 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