note 15988 added to function.include

From: Date: Thu, 11 Oct 2001 08:54:00 +0000
Subject: note 15988 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-18822@lists.php.net to get a copy of this message
Hi, I ran into this while trying to include files from anywhere in my website. At work when I used $DOCUMENT_ROOT the whole thing worked, but when I uploaded the entire site $DOCUMENT_ROOT was returning a path which used in the include returned another. This works for me under Win98/Apache1.3.20/PHP4.0.6 **********cut here************* $home = realpath("./"); $path_to_file = $home . '/path/to/file/in/tree/file.php'; **********cut here************* Good luck ! -- http://www.php.net/manual/en/function.include.php http://master.php.net/manage/user-notes.php?action=edit+15988 http://master.php.net/manage/user-notes.php?action=delete+15988 http://master.php.net/manage/user-notes.php?action=reject+15988

« previous php.notes (#18822) next »