|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using $GLOBALS in a function within a class
Code reference from the book by wrox: Professional PHP 4:
I am trying to get the statement $this->msg_no = $GLOBALS["msg_no"]; to work within my function which resides in a class. My error statement is the following: Notice: Undefined index: msg_no in C:Apache2htdocs_developmentwebmailwebmail2.php on line 46 The catch is that my server online works fine. MY SETUP: WORKSTATION SETUP: WAMP(win2k, apache 2.0.43, mysql, PHP 4.2.4 dev). SERVER SETUP: FreeBSD, PHP 4.2.2 Question: Is this a linux specific statment? or is there a setting on my workstation that I need to fix? |
|
#2
|
|||
|
|||
|
RE: Using $GLOBALS in a function within a class
That statement shouldn't be specific to any operating system.
Where is $msg_no or $GLOBALS["msg_no"]; ever set to begin with? Is is possible that it isn't set? Maybe you server setup has a lower level of error reporting, so you don't know that you are accessing an undefined index... |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Using $GLOBALS in a function within a class |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|