You are here: RE: [PHP] Help with Class « PHP « IT news, forums, messages
RE: [PHP] Help with Class

Posted by "Ian Barnes" on 09/09/05 07:33

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@internode.on.net]
Sent: 09 September 2005 12:34 AM
To: Ian Barnes
Cc: PHP General
Subject: Re: [PHP] 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация