Hello Everyone,
I am a little confused. Why do predefined variables like $PHP_SELF or
$DOCUMENT_ROOT not process within a class, in the methods secifically. For
example:
?php
class someClass {
function someFunction () {
$root = $DOCUMENT_ROOT;
return $root;
}
function
Read:
http://www.php.net/variables.scope
Also note that $_SERVER is an autoglobal.
Regards,
Philip
On Sun, 26 Jan 2003, @ Nilaab wrote:
Hello Everyone,
I am a little confused. Why do predefined variables like $PHP_SELF or
$DOCUMENT_ROOT not process within a class, in the methods
be great.
Read:
http://www.php.net/variables.scope
Also note that $_SERVER is an autoglobal.
Regards,
Philip
-Original Message-
From: @ Nilaab [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 26, 2003 1:46 PM
To: Php-General
Subject: [PHP] Predefined Variables In Classes
Hello
Well, I don't think this has anything to do with predefined variables
being
global or not because I only have use for them within the specific
methods.
The methods will capture their values and assign them to a variable
inside
the function, which will return that variable at the end. The
'
Subject: RE: [PHP] Predefined Variables In Classes
Well, I don't think this has anything to do with predefined variables
being
global or not because I only have use for them within the specific
methods.
The methods will capture their values and assign them to a variable
inside
Nevermind John, it worked! I had $_SERVER['PHP_SELF'] spelled as
$SERVER['PHP_SELF']. I appreciate your help! :P
-Original Message-
From: @ Nilaab [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 26, 2003 4:01 PM
To: Php-General
Subject: RE: [PHP] Predefined Variables In Classes
6 matches
Mail list logo