ferret219 Posted June 30, 2007 Share Posted June 30, 2007 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 https://forums.phpfreaks.com/topic/57836-using-includes/ Share on other sites More sharing options...
chocopi Posted June 30, 2007 Share Posted June 30, 2007 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 Link to comment https://forums.phpfreaks.com/topic/57836-using-includes/#findComment-286562 Share on other sites More sharing options...
ferret219 Posted June 30, 2007 Author Share Posted June 30, 2007 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. The problem is still persisting. Link to comment https://forums.phpfreaks.com/topic/57836-using-includes/#findComment-286564 Share on other sites More sharing options...
chocopi Posted June 30, 2007 Share Posted June 30, 2007 so what is the actual error message ? Link to comment https://forums.phpfreaks.com/topic/57836-using-includes/#findComment-286565 Share on other sites More sharing options...
ferret219 Posted June 30, 2007 Author Share Posted June 30, 2007 there isn't one as such, it just isn't pulling the variables which I have set in the include file. Link to comment https://forums.phpfreaks.com/topic/57836-using-includes/#findComment-286568 Share on other sites More sharing options...
AndyB Posted June 30, 2007 Share Posted June 30, 2007 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 https://forums.phpfreaks.com/topic/57836-using-includes/#findComment-286599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.