Forum Moderators: coopster
I use a database abstraction class, I use mainly a live class included like this: include('includes/class_Database.php');
Now, I'm trying to test some other things out, with a new database class. I'm including this class like this:
include('/var/www/html/test/include/class_Database.php');
By throwing an echo statement into the test class_Database.php file, I can see that it is included.
However, php seems to think I'm trying to instantiate the original database class: Cannot redeclare class database in /var/www/html/includes/class_Database.php
This error spits out even though I don't reference that file anywhere in my code ... I'm stumped on this one. Anybody have any ideas?
Thanks,
sned
pleasde take a look an all the files that are included, most probably you have 2 or more definitions for this class "database". The error occurs because you canot redeclare and exiting function, class, etc even if these classes, functions are in separated files files but are included on the working file.
Hope that's help.
Best Regards,
Aurel Vladu