Take the 2-minute tour ×  I am getting this error:  Fatal error:
Cannot redeclare class Logger in
C:\xampp\htdocs\Speakom\API\Logger.php on line 3  After changing
all my require_once to require, this error still persists. Is
there a way to prevent this error? why does it happen if I dont
have require_once?  Is there a conditional statment that I could
use to query whether the file was included already and then to
include it?  share|improve this question just a guess, you have
class Logger already defined and declared. somewhere previously
in your code. –  gorelative May 11 '12 at 16:29 defined
twice.... I scanned the code.. I havent got 2 logger classes
defined –  Matrix001 May 11 '12 at 16:32 The require bothers me
–  Matrix001 May 11 '12 at 16:33 did you really mean you've
changed all require_once to require? because that would
certainly cause the error you see if you try to require a file
that declares a class more than once. you don't need to query
anything, just use require_once, that's what it's for. If