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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • superoni@comcast.net

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

    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.

    #2
    Re: require_once() not foolproof for me, still getting class redeclarationer rors

    superoni@comcas t.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

    -------------------------------------------------------

    Comment

    Working...