Free Blog |  HTTPPoint discussion forum |  Recreation vehicle insurance |  Casino news |  Debt Info |  Debt Info(uk) |  Computer Info |  History of computer |  Flight Simulator | 

PDA

View Full Version : fatal error cannot redeclare class


srilathaapi@gmail.com
06-13-2008, 20:55
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&regards
Sri

Rik Wasmus
06-13-2008, 20:55
On Sat, 08 Sep 2007 08:33:23 +0200, <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.

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

Jerry Stuckle
06-13-2008, 20:55
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&regards
> 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
==================

Free Blog |  HTTPPoint discussion forum |  Recreation vehicle insurance |  Casino news |  Debt Info |  Debt Info(uk) |  Computer Info |  History of computer |  Flight Simulator | 
Breast Enlargement
Breast enlargement from Surgicare.

Debt Help
Debt help from debt free direct.