big-dog1965 Posted February 14, 2009 Share Posted February 14, 2009 I have a php file in a admin directory that referances another file in the ClanApp directory I cant seem to get the connection made include(dirname(__FILE__)."ClanApp/language.php"); This is the error I get Warning: include(/home/public_html/ClanApp/adminClanAppView/language.php) [function.include]: failed to open stream: No such file or directory in /home/public_html/ClanApp/admin/index.php on line 9 Link to comment https://forums.phpfreaks.com/topic/145150-simple-linking-problem-in-php-i-hope/ Share on other sites More sharing options...
Maq Posted February 14, 2009 Share Posted February 14, 2009 I think it's saying that line 9 of /home/public_html/ClanApp/adminClanAppView/language.php can't find: /home/public_html/ClanApp/admin/index.php on line 9 but then again I always get confused with includes and paths. Link to comment https://forums.phpfreaks.com/topic/145150-simple-linking-problem-in-php-i-hope/#findComment-761835 Share on other sites More sharing options...
Philip Posted February 14, 2009 Share Posted February 14, 2009 I think it's saying that line 9 of /home/public_html/ClanApp/adminClanAppView/language.php can't find: /home/public_html/ClanApp/admin/index.php on line 9 but then again I always get confused with includes and paths. Other way around The script has: include(/home/public_html/ClanApp/adminClanAppView/language.php); Link to comment https://forums.phpfreaks.com/topic/145150-simple-linking-problem-in-php-i-hope/#findComment-761842 Share on other sites More sharing options...
big-dog1965 Posted February 14, 2009 Author Share Posted February 14, 2009 This is the line that is causeing the problem include(dirname(__FILE__)."ClanApp/language.php"); Warning: include(/home/public_html/ClanApp/adminClanAppView/language.php) [function.include]: failed to open stream: No such file or directory in /home/public_html/ClanApp/admin/index.php on line 9 It is not backing out of the admin directory and going into the directory where the language.php file is. Link to comment https://forums.phpfreaks.com/topic/145150-simple-linking-problem-in-php-i-hope/#findComment-761873 Share on other sites More sharing options...
Philip Posted February 14, 2009 Share Posted February 14, 2009 Well, why do you have "dirname(__FILE__)" in there if the file is not in the same directory? EDIT: are you wanting ../ClanApp/admin/ClanAppView/language.php? If so you need: include(dirname(__FILE__)."/ClanAppView/language.php"); Link to comment https://forums.phpfreaks.com/topic/145150-simple-linking-problem-in-php-i-hope/#findComment-761874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.