473,658 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fetal 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
1 1867
sr*********@gma il.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
You don't include it three different times. You include it once
(usually at the top of your script) then call the functions you want as
necessary.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Sep 8 '07 #2

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

Similar topics

3
3909
by: Phil Da Lick! | last post by:
Hi, Because GDI+ doesnt support inversion of rectangles on a graphics device (!!!) I'm attempting to call InvertRect() on the api direct from my c# project. In the file in questions, directly after the using directives and before the class/namespace bit I've got (found this on the web):
11
41077
by: Kimmo Laine | last post by:
I'm flipping my wig here, people. I'm using classes and making each class a file. when I'm including dependet classess, I use require_once to avoid multiple declarations - yet they happen. I put debug_print_backtrace in the file to see how it is included, and here's the output: #0 require_once() called at #1 require_once(\eKirje.textGrid.class.php) called at #0 require_once() called at #1 require_once(\eKirje.kanava.class.php)...
1
3244
by: Behzad | last post by:
hi, i want to know what happens to objects in an array if i redeclare the array.. look at the following code: ////my code public MyClass myarray=new MyClass;
2
8096
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
1803
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 How I rectify it? <?php
2
14323
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 xxx.php from 3 different functions.so can u give me the solution. Thanks&regards Sri
2
1812
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 date_format(). I know that this is built in with PHP 5 but I need to know how to fix it without getting another error message saying that my cookies are disabled. Can anyone please help me?
5
3658
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 search and determined that "func_name" really is unique. Besides, how is this even possible? It was previously declared on the same line it's declared? Any help is appreciated. Thank you!
6
2883
by: willlen | last post by:
Hello, I got message: Fatal error: Cannot redeclare sqlconnect() (previously declared in E:\Program Files\Apache Group\Apache2\htdocs\openemr-2.9.0\library\sql.inc:33) in E:\program files\apache group\Apache2\htdocs\openemr-2.9.0\library\sql.inc on line 36 File sql.inc: <?php ... function sqlConnect($login,$pass,$dbase,$host,$port = '3306') { return $GLOBALS = $database->_connectionID;
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8330
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8850
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.