Connecting Tech Pros Worldwide Forums | Help | Site Map

require_once() not foolproof for me, still getting class redeclaration errors

superoni@comcast.net
Guest
 
Posts: n/a
#1: Jul 17 '05
Hello, I use require_once() in all my code that includes a separate
class declared inside there.

However, there are times in certain cases where I will still get a
class redeclaration error. The php error log says I'm FATAL ERROR,
can't redeclare class or something to that extent. ph34r.gif

Are there any other cases where this error might occur even while using
require_once()?

Thanks


Markus L.
Guest
 
Posts: n/a
#2: Jul 17 '05

re: require_once() not foolproof for me, still getting class redeclaration errors


superoni@comcast.net wrote:[color=blue]
> Hello, I use require_once() in all my code that includes a separate
> class declared inside there.
>
> However, there are times in certain cases where I will still get a
> class redeclaration error. The php error log says I'm FATAL ERROR,
> can't redeclare class or something to that extent. ph34r.gif
>
> Are there any other cases where this error might occur even while using
> require_once()?
>
> Thanks
>[/color]

This can happen when you are using relative paths in Windows.


--
-------------------------------------------------------
Try this: SCA the Smart Class Archive for PHP
http://www.project-sca.org
-------------------------------------------------------
Closed Thread