# File Directory Commands (PHP)

**URL:** <https://forum.kirupa.com/t/file-directory-commands-php/133384>\
**Category:** Uncategorized\
**Created:** [January 8, 2005, 12:07am UTC](https://forum.kirupa.com/t/file-directory-commands-php/133384 "2005-01-08T00:07:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrhines1](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mrhines1/32/434_2.png) [@mrhines1](https://forum.kirupa.com/u/mrhines1)\
**Post date:** [January 8, 2005, 12:07am UTC](https://forum.kirupa.com/t/file-directory-commands-php/133384/1 "2005-01-08T00:07:53Z")

</div>

I am using PHP and need to include a PHP file from another location but I cannot figure out the directory command to get the file I want. Here is an example of the structure:

```php

folder1
   |
folderA -------- folderB
   | |
folderC file_two
   |
file_one

```

That is a rough idea. I am attempting to reference file\_two from file\_one but keep getting errors because I’m not properly using directory commands. Also, folder1 is a subfolder, not the root folder.

If I put file\_one in folderA and use ‘…/folderB/file\_two’ it works, but I need to go up 2 folders.

Sorry for rambling. Can someone please show me the correct command?

Thank you very much!
