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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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