# How to get a PHP file to be included across files in different directories?

**URL:** <https://forum.kirupa.com/t/how-to-get-a-php-file-to-be-included-across-files-in-different-directories/321021>\
**Category:** programming\
**Created:** [April 8, 2011, 3:17am UTC](https://forum.kirupa.com/t/how-to-get-a-php-file-to-be-included-across-files-in-different-directories/321021 "2011-04-08T03:17:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anna\_Hussie](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Anna\_Hussie](https://forum.kirupa.com/u/Anna_Hussie)\
**Post date:** [April 8, 2011, 3:17am UTC](https://forum.kirupa.com/t/how-to-get-a-php-file-to-be-included-across-files-in-different-directories/321021/1 "2011-04-08T03:17:46Z")

</div>

Currently I have created some php based webpages and uploaded them to my web hosting server.It has a PHP 5.1.6  
installed.With this I am able to include files only that are in the same directory(they work well using require() fn).If not an error message displaying some “no such file” in directory appears in the page.I would like to use them to be included in different direcetories.What should I do?
