RE: [PHP] Help Learning Classes

From: Date: Tue, 15 Apr 2003 11:13:35 +0000
Subject: RE: [PHP] Help Learning Classes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143911@lists.php.net to get a copy of this message
Hi The errors are as follows: Warning: Missing argument 1 for page_navigation() in /var/www/html/ittracker/include/oop_page_nav.php on line 13 This is repeated 4 times which leads me to believe it is a problem with my vars. <extract line 13> function page_navigation($link, $totalrows, $limit, $page) </extract> The next error reads: Warning: Division by zero in /var/www/html/ittracker/include/oop_page_nav.php on line 29 but this is obviously due to my vars not being set. I think my problem is where I should be using $this-> with my vars, I am not entirely sure where to use these. Ross ¤-----Original Message----- ¤From: Jason Wong [mailto:php-general@gremlins.biz] ¤Sent: 15 April 2003 12:35 ¤To: php-general@lists.php.net ¤Subject: Re: [PHP] Help Learning Classes ¤ ¤ ¤On Tuesday 15 April 2003 18:17, Ross Bateman wrote: ¤ ¤> I am trying to get my head around classes. I have the following ¤script that ¤> when run as a function works great, but I can not get it to ¤function as a ¤> class. ¤> I call it: ¤> include($root_path . "include/oop_page_nav.php"); ¤> $topnav = &New page_navigation; ¤> $topnav->page_navigation($PHP_SELF, $totalrows, $limit, $page); ¤> ¤> This is the script but it generates a lot of errors.......and ¤then seemes ¤> to give me the nav that I was trying to get. ¤ ¤It would help tremendously if you would state what errors you're getting. ¤ ¤[lots of code snipped] ¤ ¤-- ¤Jason Wong -> Gremlins Associates -> www.gremlins.biz ¤Open Source Software Systems Integrators ¤* Web Design & Hosting * Internet & Intranet Applications Development * ¤------------------------------------------ ¤Search the list archives before you post ¤http://marc.theaimsgroup.com/?l=php-general ¤------------------------------------------ ¤/* ¤Execute every act of thy life as though it were thy last. ¤ -- Marcus Aurelius ¤*/ ¤ ¤ ¤-- ¤PHP General Mailing List (http://www.php.net/) ¤To unsubscribe, visit: http://www.php.net/unsub.php ¤

« previous php.general (#143911) next »