RE: [PHP] $DOCUMENT_ROOT -- didn't work from a class..

From: Date: Wed, 30 Aug 2000 08:55:54 +0000
Subject: RE: [PHP] $DOCUMENT_ROOT -- didn't work from a class..
Groups: php.general 
Request: Send a blank email to php-general+get-14347@lists.php.net to get a copy of this message
I think I fixed my own problem: i tried getenv($DOCUMENT_ROOT) and it worked, Thanks to anyone who tried to solve it or just thought 'bout it. now, just for my own education, why did it happened? was there a reason for it? was there anything else to do? Thank you ALL! -----Original Message----- From: Maxim Maletsky Sent: Wednesday, August 30, 2000 5:40 PM To: 'vn@vamsi.net' Cc: PHP General List. (E-mail) Subject: RE: [PHP] $DOCUMENT_ROOT -- didn't work from a class.. it's actually a variable set on the top of the class like: var $d_Root = $DOCUMENT_ROOT; and then my fopen($this->d_Root.'/data/myFile.inc',w) is not able to open it. So i tried to echo it for testing and it resulted to be an empty variable. echo $this->d_Root; echo $DOCUMENT_ROOT; have failed.. What could it be, guys? -----Original Message----- From: Vamsi Nath [mailto:vn@vamsi.net] Sent: Wednesday, August 30, 2000 5:31 PM To: Maxim Maletsky; PHP General List. (E-mail) Subject: RE: [PHP] $DOCUMENT_ROOT -- didn't work from a class.. Make sure you specify $DOCUMENT_ROOT as a global variable inside your function. --Vamsi http://php.vamsi.net -----Original Message----- From: Maxim Maletsky [mailto:maxim.maletsky@lincmedia.co.jp] Sent: Wednesday, August 30, 2000 4:27 AM To: PHP General List. (E-mail) Subject: [PHP] $DOCUMENT_ROOT -- didn't work from a class.. Hello gurus! In one of my classes that I'm currently writing I'm trying to output $DOCUMENT_ROOT as simple as that... echo 'HERE->>>'.$DOCUMENT_ROOT.'<br>'; but because it is inside a function which is called from the main script, it does not output anything except HERE->>> What can be the problem? Why it happens inside the class and not on a simple php file? If I don't mistake language_variables_predefined_apacheApache variables once they are activated should work no matter what the extension of the file is as long as they are includ()ed, right? Greatly appreciate your help. Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com> Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 http://www.j-door.com <http://www.j-door.com/> http://www.japaninc.net <http://www.japaninc.net/> http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#14347) next »