Jump to content

Warning: include(../languages/english.lang.php) [function.include]:


Recommended Posts

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?

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.