Jump to content

PHP include files from directory


EagerWolf

Recommended Posts

You have to have your includes in reference to where the main script is running from.

If your main script is file2 and you want to include file1
[code]include("../dir1/file1.php");[/code]

now inside of file1 you want to include something in dir1-1 you still have to go from where file2 is. So since file1 is running from file2 your include in file1 would be
[code]include("../dir1/dir1-1/file.php");[/code]

Ray

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.