PHP: cannot redeclare class -


so have 3 classes in situation.

connection.php engineer.php status.php 

both engineer , status classes use connection. hasn't been problem i'm using both classes in page i'm getting

fatal error: cannot redeclare class connection 

is there way round this? in both classes need db access connection class.

thanks,

jonesy

instead of using include() use require_once() importing connection.php engineer.php , status.php.


Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -