PHP Cannot redeclare class


Posted on 16th Feb 2014 07:03 pm by admin

I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot redeclare class" error.

** edit **
I know its these 2 files, because when i comment out the include for login.php, the error goes away.
**end edit**

The full error:
Fatal error: Cannot redeclare class Base in coreBase.php on line 7

Base.php
Code: <?php
/**
* Base.php is the base class for all functions.
*
*/

class Base {

function __construct() {

include("Admin.php");
include("Feed.php");
include("Login.php");
include("Session.php");
include("SQLManager.php");
include("Twitter.php");

}

function __destruct() {
}

}
?>
Login.php
Code: <?php
/**
* Login.php is the class for all Application login functions.
*
*/

class Login extends Base {

function __construct() {
}

function Login() {
}

function Logout() {
}

function __destruct() {
}

}
?>
All of the files that are included in the Base __construct, extend Base.

Anyone have any ideas?

No comments posted yet

Your Answer:

Login to answer
302 Like 14 Dislike
Previous forums Next forums
Other forums

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Thought I has this figured out especially after all the help i received?
Cags, Salathe, Daniel helped me with this yesterday, but not sure i took it all in.
I am attempti

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Transport data between itab and textfield on ALV event
Hallo,

I have a ALV Grid ( cl_gui_alv_grid ) and I also have hotspot click event with a h

Receive Rosettanet Message to SAP 4.6c
Dear all ,

My customer will send the PO details by rosettanet message , Is it

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash