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

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-08-2004
superoni@comcast.net
 
Posts: n/a
Default 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

Reply With Quote
  #2 (permalink)  
Old 12-11-2004
Markus L.
 
Posts: n/a
Default Re: require_once() not foolproof for me, still getting class redeclarationerrors

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
-------------------------------------------------------
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:26 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0