TeddyKiller Posted April 25, 2010 Share Posted April 25, 2010 Warning: include(../languages/english.lang.php) [function.include]: failed to open stream: No such file or directory in /home/jeanie/public_html/design/inc/prerequisites.php on line 16 My prerequisites.php file, includes english.lang.php The include is in the error.. include("../languages/english.lang.php"); Though on dreamweaver, it locates the file perfectly.. though on my server it doesn't. Whats wrong? My site layout is similar to follows. public_html - ima - All the images - inc - prerequisites.php - other php files - languages - english.lang.php - styles - style.css - templates - header.php - footer.php - then website pages here Thanks! Note: prerequisites is included in the website pages. Although it gets config and everything alright. So it should ideally get the language right? Quote Link to comment https://forums.phpfreaks.com/topic/199660-warning-includelanguagesenglishlangphp-functioninclude/ Share on other sites More sharing options...
RichardRotterdam Posted April 25, 2010 Share Posted April 25, 2010 If the error occurs in: /home/jeanie/public_html/design/inc/prerequisites.php and you want to include: /home/jeanie/public_html/languages/english.lang.php Your include line should be: include "../../languages/english.lang.php"; It's actually stranger your original line works on your localhost. Quote Link to comment https://forums.phpfreaks.com/topic/199660-warning-includelanguagesenglishlangphp-functioninclude/#findComment-1047921 Share on other sites More sharing options...
TeddyKiller Posted April 25, 2010 Author Share Posted April 25, 2010 Oh sorry. My mistake. All the files are in directory 'design' Forgot to put that in.. sorry. Quote Link to comment https://forums.phpfreaks.com/topic/199660-warning-includelanguagesenglishlangphp-functioninclude/#findComment-1047922 Share on other sites More sharing options...
RichardRotterdam Posted April 25, 2010 Share Posted April 25, 2010 Does that mean the language folder is: /home/jeanie/public_html/design/language Quote Link to comment https://forums.phpfreaks.com/topic/199660-warning-includelanguagesenglishlangphp-functioninclude/#findComment-1047940 Share on other sites More sharing options...
TeddyKiller Posted April 25, 2010 Author Share Posted April 25, 2010 Yeah.. Lets say.. the config.php file, is in inc. The prerequisites.php file, is in inc. If I include prerequisites from any website file (inside directory design where everything is at the moment) the config.php works. The include for config.php is.. include("config.php"); as both prerequisites and config are both in the same folder. languages isn't. So.. I did.. include("../languages/english.lang.php"); that didn't work. So I tried this.. include("languages/english.lang.php"); that did work. Although doesn't say it works on dreamweaver. Which confuses me. I can also use include("inc/config.php"); this works too.. but doesn't work on dreamweaver. It's confusing. Temporarily.. I moved prerequisites to outside the inc folder so its with the rest of the website files. I wouldn't like it there.. but.. can't think of a suitable fix. Quote Link to comment https://forums.phpfreaks.com/topic/199660-warning-includelanguagesenglishlangphp-functioninclude/#findComment-1047959 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.