scm0sml
asked on
Fatal error: Cannot redeclare class email
Fatal error: Cannot redeclare class email
A bit vague I know but can any1 give me any hints as to why I'm getting this error......
I only ever declare an email class once...........
any ideas?
A bit vague I know but can any1 give me any hints as to why I'm getting this error......
I only ever declare an email class once...........
any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yeah that works...........wouldn't even have thought of that!!
cheers!
cheers!
Right, once it's included, it's available throughout. But you can use the special include_once instead of include, so you don't have to worry about whether or not your included it already.
ASKER
include_once"../includes/c lasses/Own er.php";
like that?
like that?
yep
ASKER
thanks a lot.
ASKER
In this file I include:
include "../includes/classes/Owner
&
include "../includes/classes/Email
But the owner class also includes the email class.
So are you saying that I do not need to include the email class in this file because it will be usable having included it in the owner class?