RE: Help with Class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ryan,

I am including a different class.inc.php file each time the foreach loops.
Each one sits in a different dir. Yes, I do get that error. 

My understanding of OOP is that I could null the $sdk variable and re-init
it when the loop starts again..

Cheers

-----Original Message-----
From: Ryan Creaser [mailto:rjcreaser@xxxxxxxxxxxxxxxx] 
Sent: 09 September 2005 12:34 AM
To: Ian Barnes
Cc: PHP General
Subject: Re:  Help with Class

Ian Barnes wrote:

>                                    require_once (
>$fetchd['path'].'sdk/ipbsdk_class.inc.php' );
>  
>

What is the above line doing? It looks like you are trying to redeclare 
the ipbsdk class each time around the loop which is illegal in php. You 
can't do :

class ipbsdk {
 ...
}

and then (in the same request)

class ipbsdk {
...
}

because the names will clash. This should  cause a "Fatal error: Cannot 
redeclare class ipbsdk ..." message though. Are you seeing any errors?

- Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux