Could someone please help me with this.
I want to use PHP in my website; but run into a snag, the recommended
method of calling an include is:
<?php include($_SERVER["DOCUMENT_ROOT"]."/inc/css-gateway.inc"); ?>
when I try
<?php ECHO $_SERVER["DOCUMENT_ROOT"]; ?> the document root is shown as
/usr/local/apache/htdocs/
However the website root is at:
/mnt/home/www/canadian-dream.com/www
How do I redirect $_SERVER["DOCUMENT_ROOT"] to the my website root? Is
there a global variable that can be used? I do not wish to rewrite a lot
of pages if I were to change web host in the future.
from the error logs
[Sat Oct 25 06:32:51 2003] [error] PHP Warning:
main(/usr/local/apache/htdocs/inc/css-gateway.inc): failed to open stream:
No such file or directory in
/mnt/home/www/canadian-dream.com/www/de/immobilien/main.php on line 15
[Sat Oct 25 06:32:51 2003] [error] PHP Warning: main(): Failed opening
'/usr/local/apache/htdocs/inc/css-gateway.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/mnt/home/www/canadian-dream.com/www/de/immobilien/main.php on line 15
Thanks
Paul