Re[2]: [PHP-WIN] RE: path under include() function
| From: | Pablo Vera | Date: | Thu, 23 Nov 2000 15:35:44 +0000 |
| Subject: | Re[2]: [PHP-WIN] RE: path under include() function | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4076@lists.php.net to get a copy of this message | ||
Mykone:
$DOCUMENT_ROOT is a variable provided by Apache to PHP, maybe you
should look at the IIS5 documentation and see if it provides this or
other variable like this one.
Also, you can list all the elements of the $GLOBALS array to see if
you can manually find that variable, like this:
<?php
reset($GLOBALS);
while (list ($key, $val) = each ($GLOBALS)) {
echo "$key => $val<br>";
}
?>
Saludos,
Pablo Vera
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Thursday, November 23, 2000, 10:48:36 AM, Mykone wrote:
MCS> Hi Mitesh! Thanks for your reply. You should have replied to the thread I
MCS> started :o) Anyways.
MCS> Well I tried your code in my script..
MCS> <?php include("$GLOBALS[DOCUMENT_ROOT]/includes/header.htm"); ?>
MCS> And here's the error I got.
MCS> =========================================================
MCS> Warning: Undefined index: DOCUMENT_ROOT in
MCS> d:\websites\inetccon.com\references\index.php on line 8
MCS> Warning: Failed opening ' /includes/header.htm' for inclusion
MCS> (include_path='') in d:\websites\inetccon.com\references\index.php on line 8
MCS> ==========================================================
MCS> If you use ICQ maybe we could debug this some more together. My ICQ number
MCS> is: 7893837
MCS> Hoping to hear from you again. Oh I don't want to use specified path. I'm a
MCS> web developer and i'm testing my sites on my own computer once it's done and
MCS> working I then upload it, I want to have a fast way of finishing my sites
MCS> without having to go back and rename all those paths and stuff, yu nuh!. It
MCS> should work on any system. Now i'm stuck again.