Jump to content

Archived

This topic is now archived and is closed to further replies.

niihon

OOP scope issues (I think)

Recommended Posts

First off- I want to thank everyone for thier help - I really appreciate it.

I have three class A B C- B extends A - C extends B-

I am able to call functions from A from B, when i call functions from A from C i get this error:

Fatal error: Cannot redeclare class A in /home/techdoco/public_html/A.class.php on line 8

Line 8 is the declaration of class A in A.class.php

I went through all my code and removed the $this and replaced with :: (ie. A::function). Still getting this error.

Any ideas?


Thanks again

Share this post


Link to post
Share on other sites
Sounds as though you are redeclaring class A which has already been declaired. Really hard to see without code, and I imagine the code is to big to paste.

How are you including these classes together? Make sure your using include_once(), this prevents a class from being included twice.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.