# Using "include" twice

**URL:** <https://forum.kirupa.com/t/using-include-twice/303240>\
**Category:** programming\
**Created:** [January 17, 2010, 12:54pm UTC](https://forum.kirupa.com/t/using-include-twice/303240 "2010-01-17T12:54:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IQAndreas](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@IQAndreas](https://forum.kirupa.com/u/IQAndreas)\
**Post date:** [January 17, 2010, 12:54pm UTC](https://forum.kirupa.com/t/using-include-twice/303240/1 "2010-01-17T12:54:15Z")

</div>

I can’t seem to get this right. It keeps messing up for me.

I have a PHP file that contains nothing but a “defined or die” and a class definition. I need to use this same class in two different places.

If I use “include” in both places, PHP doesn’t display an error, but it just gives me that “no formatting” look and doesn’t display everything.

Is there any way to check if a class has already been imported, or any way to allow you to import the same class twice without errors?
