Re: Quick question

From: Date: Mon, 04 Dec 2000 21:38:35 +0000
Subject: Re: Quick question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28627@lists.php.net to get a copy of this message
You probably didn't define the function before trying to call it. In PHP 3 that was a requirement. -Rasmus On Mon, 4 Dec 2000, Erik J. Barzeski wrote: > Hi, > > I'm used to running PHP 4 and today I have a quick task (porting code) > to a machine that is unfortunately running PHP 3... > > It doesn't like this function (and perhaps some others): > > function is_super($someuser) > { > include("can_see_stats.inc"); > > for ($i = 0; $i < count($can_see_stats); $i++) > { > if ($can_see_stats[$i] == $someuser) > return true; > } > return false; > } > > > can_see_stats.inc contains: > > <?php > $can_see_stats[] = "user1"; > $can_see_stats[] = "user2"; > $can_see_stats[] = "user3"; > // etc. > ?> > > and this is used like: > > if (is_super($username)) > { > ?><br><br><div align="center"><? > show_stats (); > ?></div><?php > } > > I get this error: > Fatal error: Call to unsupported or undefined function is_super() in > /home/erik/public_html/index.php3 on line 1 > > > So... Am I doin' wrong? :) > > > -- > Best wishes, > Erik J. Barzeski > > Why do we ask rhetorical questions? > ************************************************ > Email: erik@barzeski.com > Web: http://www.barzeski.com/ > http://www.soundsetcentral.com/ > http://www.applescriptcentral.com/ > AIM: iacas ICQ: 8186546 > ************************************************ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#28627) next »