RE: [PHP] Include & redeclare error

From: Date: Tue, 16 Oct 2001 14:32:22 +0000
Subject: RE: [PHP] Include & redeclare error
Groups: php.general 
Request: Send a blank email to php-general+get-71213@lists.php.net to get a copy of this message
> Out of the blue, one of my apps is giving me the following error: > > Fatal error: Cannot redeclare db_open() in > C:\Webroot\Photos\php\functions.php on line 8 > > On every page I have > <? include "functions.php"; ?> > > This was working for many months and works in all of my other > apps. Any > ideas of what may have changed? I tried include_once(), but that did > not correct the problem. If I reload the page, everything is OK. include_once() is what you should always use for function inclusion, and your problem is that functions.php have been included more than once. You say youself that everything's ok when you reload, fine - then there really is no problem, is it? /Martin

« previous php.general (#71213) next »