Re: OOP-related question
| From: | Miguel Cruz | Date: | Mon, 29 Apr 2002 16:57:44 +0000 |
| Subject: | Re: OOP-related question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95200@lists.php.net to get a copy of this message | ||
On Mon, 29 Apr 2002 heinisch@creaction.de wrote:
> I include this in my class-function, which works fine for the most
> variables but $SERVER_ADDR It seems that I cannot get these variable in
> the function of my class so I have to pass them as argument to the
> function. I have made an init() function where I pass these vars inside
> the object But I don´t like to do this, vars like $SERVER_ADDR or *_NAME
> should be available inside the objects-functions. Is this behaviour
> normal, or are there any workarounds for it?
function cheeseTaster()
{
global $SERVER_ADDR;
}
miguel