The Little Guy Posted June 26, 2007 Share Posted June 26, 2007 how come if I do this: include '..../../news/includes/boxes/news.php'; The code works, But if I do one of these, it doesn't: include '/news/includes/boxes/news.php'; include '../../../news/includes/boxes/news.php'; Link to comment https://forums.phpfreaks.com/topic/57206-include-path/ Share on other sites More sharing options...
cooldude832 Posted June 26, 2007 Share Posted June 26, 2007 i think ./ returns you to the root and ../ move you up 1 level Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282740 Share on other sites More sharing options...
mmarif4u Posted June 26, 2007 Share Posted June 26, 2007 Yes cooldude832 is right. ../ for one level up. ./ back to root. The below code will work but depends on ur directory structure. include '../../../news/includes/boxes/news.php'; Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282742 Share on other sites More sharing options...
cooldude832 Posted June 26, 2007 Share Posted June 26, 2007 if you having a big issue just revert to the root and go from there Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282746 Share on other sites More sharing options...
The Little Guy Posted June 26, 2007 Author Share Posted June 26, 2007 but what do the four dots before the first slash mean? That is the only thing that works. If I don't have the four dots, it can't find the file Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282748 Share on other sites More sharing options...
cooldude832 Posted June 26, 2007 Share Posted June 26, 2007 read the error it gives you(if it does) otherwise its probably phrasing ..../ as ../ and moving it up only one level Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282751 Share on other sites More sharing options...
suma237 Posted June 26, 2007 Share Posted June 26, 2007 can you write the tree structure Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282754 Share on other sites More sharing options...
The Little Guy Posted June 26, 2007 Author Share Posted June 26, 2007 The tree is complicated, so here is a diagram: [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282771 Share on other sites More sharing options...
suma237 Posted June 26, 2007 Share Posted June 26, 2007 ebay/news/include... start from the mainfolder Link to comment https://forums.phpfreaks.com/topic/57206-include-path/#findComment-282775 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.