This is a discussion on require_once() not foolproof for me, still getting class redeclaration errors within the PHP Language forums, part of the PHP Programming Forums category; Hello, I use require_once() in all my code that includes a separate class declared inside there. However, there are times ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
superoni@comcast.net wrote:
> 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 > 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 ------------------------------------------------------- |