fatal error cannot redeclare class

fatal error cannot redeclare class

am 08.09.2007 08:33:23 von srilathaapi

Hi All,
I am getting the error cannot redeclare the class some xxx in
file xxx.php.
bcz i m including xxx.php in 3 diffrent functions in the same file to
invoke the 3 differnet functions in the xxx.php from 3 different
functions.so can u give me the solution.

Thanks®ards
Sri

Re: fatal error cannot redeclare class

am 08.09.2007 15:02:53 von luiheidsgoeroe

On Sat, 08 Sep 2007 08:33:23 +0200, wrote:

> Hi All,
> I am getting the error cannot redeclare the class some xxx in
> file xxx.php.
> bcz i m including xxx.php in 3 diffrent functions in the same file to
> invoke the 3 differnet functions in the xxx.php from 3 different
> functions.so can u give me the solution.

Function- and classdeclarations are automatically global, so if you need
to use a function or a class reincluding it's file is not necessary. Files
with (a) class(es)/function(s) should be require_once()'ed.
--
Rik Wasmus

Re: fatal error cannot redeclare class

am 08.09.2007 15:16:02 von Jerry Stuckle

srilathaapi@gmail.com wrote:
> Hi All,
> I am getting the error cannot redeclare the class some xxx in
> file xxx.php.
> bcz i m including xxx.php in 3 diffrent functions in the same file to
> invoke the 3 differnet functions in the xxx.php from 3 different
> functions.so can u give me the solution.
>
> Thanks®ards
> Sri
>

Don't multipost. Already answered in another newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================