Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

$DOCUMENT_ROOT doesn't work ?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Postby Joan Garnet » Tue Jan 28, 2003 3:48 pm

It should work..
Apache variables
These variables are created by the Apache webserver. If you are running another webserver, there is no guarantee that it will provide the same variables; it may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the CGI 1.1 specification, so you should be able to expect those.

Use this to see if the variable is set:

Code: Select all
<?php
   echo "<pre>";
   print_r ($HTTP_SERVER_VARS);
   echo "</pre>";
?>

You'll get a list of variables and DOCUMENT_ROOT should be there.
User avatar
Joan Garnet
Moderator
Moderator
 
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Postby Oleg Butuzov » Wed Jan 29, 2003 1:03 am

Joan Garnet wrote:
Code: Select all
<?php
   echo "<pre>";
   print_r ($HTTP_SERVER_VARS);
   echo "</pre>";
?>



I prefere to use $_SERVER vars...
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Joan Garnet » Wed Jan 29, 2003 1:55 am

Hi Pejone!
nice to see you :D :D
User avatar
Joan Garnet
Moderator
Moderator
 
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Postby Oleg Butuzov » Wed Jan 29, 2003 2:49 am

I pass all exams in university so i am back to our team =)
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.