PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 9th, 2002, 10:13 PM
bnisperos bnisperos is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 bnisperos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old October 10th, 2002, 12:30 AM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
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...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Using $GLOBALS in a function within a class


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT