473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

fatal error cannot redeclare class

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

Sep 8 '07 #1
2 14307
On Sat, 08 Sep 2007 08:33:23 +0200, <sr*********@gmail.comwrote:
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
Sep 8 '07 #2
sr*********@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.
js*******@attglobal.net
==================
Sep 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function...
4
by: SharpDog | last post by:
I am running VC++ 6.0 w/ SP5 installed, MS W2K w/ SP4 installed on a standard IBM PC (256 MB RAM). Here is the entire message (note that I don't have MSDN installed so I cannot choose 'Technical...
2
by: Itjalve | last post by:
This gives me a fatal error. I'm using .NET VC7.1 and made a win32 consol app, I have no problems with VC6. Debug build. I have removed nearly all my code this is whats left. From the beginning...
12
by: TristaSD | last post by:
Hi, Here's a nice footer I get inside every php page I write in wwwroot on my server. The code gets parsed just fine. I installed php5.2-win32 under W2K Server, IIS 5.0. I've installed php on...
2
by: Midgard | last post by:
I have this error: Fatal error: Cannot redeclare send_welcome_mail() (previously declared in /home/oxxowhol/public_html/config.php:21) in /home/oxxowhol/public_html/config.php on line 21 Why?
4
by: Kesavan | last post by:
I need polymorphism in php. When I run this following code I get the following error. Fatal error: Cannot redeclare aClass::aPrint() in C:\Program Files \xampp\htdocs\k7\prCls.php on line 16 ...
1
by: srilathaapi | last post by:
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...
2
by: ann86 | last post by:
Hello, I am a newbie to PHP and I am working on a site that was created by someone else. The server was updated yesterday so now I am getting the error Fatal error: Cannot redeclare...
5
by: Just Another Victim of the Ambient Morality | last post by:
I have a peculiar bug in my PHP code. It looks something like this: Fatal error: Cannot redeclare func_name() (previously declared in script.php:57) in script.php on line 57 I've done a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.