hkothari Posted September 20, 2009 Share Posted September 20, 2009 So, let's say I have a site setup like this /index.php /file.php /file3.php /dir/ /dir/file2.php Now, I know if I needed to include file.php from index.php I would use: include("file.php") and if I wanted to include file2.php I would use: include("dir/file2.php"); but what if I wanted to use file2.php from index.php and file2.php needed file3.php would I use include("file3.php"); or include("../file3.php"); because the file that is actually being executed is index.php? Link to comment https://forums.phpfreaks.com/topic/174898-include-files-in-different-directories/ Share on other sites More sharing options...
Garethp Posted September 20, 2009 Share Posted September 20, 2009 ../file3.php Link to comment https://forums.phpfreaks.com/topic/174898-include-files-in-different-directories/#findComment-921710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.