By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
su******@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
-------------------------------------------------------
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.