Jump to content

Using includes


ferret219

Recommended Posts

When I use includes on my site, I have usually had the conf.php file in the same folder as the web page which will be using it and everything has worked fine, but when I have tried to tidy up my folder structure and put all of the includes in the same folder, the page gives me an error. The code which I am using is below.

 

include("/../includes/conf.php");

 

Chris

Link to comment
Share on other sites

i dont know, but you could try removing the first slash

 

include("../includes/conf.php");

 

or you could try using ' instead of "

 

EDIT = by the way, what is the error ?

 

~ Chocopi

 

Tried, and failed.  :D The problem is still persisting.

Link to comment
Share on other sites

If there are no errors, then you can assume that the relative path to the include file is correct.  If it isn't 'pulling the variables' then there's something wrong with your code, e.g. the variables are wrongly defined, the variable names don't match your expectations (spelling, case, etc.)  In the absence of visible code, there isn't much more anyone can do.

Link to comment
Share on other sites

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.