Re: note 9105 added to Classes and Objects
| From: | J. M. Castagnetto | Date: | Tue, 17 Oct 2000 20:48:30 +0000 |
| Subject: | Re: note 9105 added to Classes and Objects | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6586@lists.php.net to get a copy of this message | ||
What you observed has already been noted in a previous
post in the same page, making it redundant. Your note
has been removed.
--- mfischma@yahoo.com wrote:
> I was trying to check a cookie in a class function
> and I noticed the following about HTTP_COOKIE_VARS.
>
> class a {
> function r() {
> $cookieValue=$HTTP_COOKIE_VARS["aCookie"];
> }
> }
>
> the above will not set the value of aCookie to
> $cookieValue, but ...
>
> class a {
> function r() {
> $cookies=$GLOBALS["HTTP_COOKIE_VARS"];
> $cookieValue=$cookies["aCookie"];
> }
> }
>
> would set the value of the cookie aCookie to
> $cookieValue. I am assuming that all the preset
> variables act as global variables within a class
> function. If you have any trouble with any preset
> variables or HTTP variables, tryout the above.
>
> http://www.php.net/manual/language.oop.php
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/