Fatal error: Cannot redeclare class [Name] in C:\Program Files\xampp\htdocs\inbox\php\[myclass].class.php on line 9
I'm looking for a solution on this problem happens to be my first time to meet this error from my php code. First i thought it was in the line of having
$myclass = New classname;
then i realized it was in the line where i include the class file.
include "[myclassname].class.php";
what i did was
[condition] ? include "[myclassname].class.php" : "";
basically the solution is not to include file when it was declared already.
No comments:
Post a Comment