# .inc extension , why to use it ?!

**URL:** <https://forum.kirupa.com/t/inc-extension-why-to-use-it/268575>\
**Category:** programming\
**Created:** [August 15, 2008, 1:27pm UTC](https://forum.kirupa.com/t/inc-extension-why-to-use-it/268575 "2008-08-15T13:27:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darroosh](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@darroosh](https://forum.kirupa.com/u/darroosh)\
**Post date:** [August 15, 2008, 1:27pm UTC](https://forum.kirupa.com/t/inc-extension-why-to-use-it/268575/1 "2008-08-15T13:27:37Z")

</div>

What is the benefit of making some files with extension " .inc or .ini " in a PHP script ???

i found this line in website introducing php tutorials ,

```php
 
include "connect.ini";

```

in the file " connect.ini " they put the code to connect to Database …

I tried on localhost to do this , it worked fine … but i noticed a big problem …

when i request the file .ini from the browser direclty , it is downloaded !  
and when i request the file .inc from the browser directly , its code is shown on the screen …

so , what is the benefit of using them , and when and why to use them ???
