squiblo Posted September 11, 2009 Share Posted September 11, 2009 ok, firstly my directories look like this... " root > includes > php and css files " i have a file in the root folder called "about.php" and a line of the code in this file says... <?php include './includes/footerlinks.php'; ?> but i am getting 3 different error messages popping up when i want to view the page that say... Warning: include() [function.include]: Unable to access ./includes/footerlinks.php in /customers/squiblo.com/squiblo.com/httpd.www/footpages/about.php on line 53 Warning: include(./includes/footerlinks.php) [function.include]: failed to open stream: No such file or directory in /customers/squiblo.com/squiblo.com/httpd.www/footpages/about.php on line 53 Warning: include() [function.include]: Failed opening './includes/footerlinks.php' for inclusion (include_path='.:/usr/share/php') in /customers/squiblo.com/squiblo.com/httpd.www/footpages/about.php on line 53 does anybody know why? please help. Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/ Share on other sites More sharing options...
squiblo Posted September 11, 2009 Author Share Posted September 11, 2009 sorry the "about.php" file is not in the root folder, it is in " root > footerlinks > about.php " Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916736 Share on other sites More sharing options...
iPixel Posted September 11, 2009 Share Posted September 11, 2009 nevermind i saw ur 2nd post a bit late.... hmmm (thinking, will answer soon) Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916740 Share on other sites More sharing options...
squiblo Posted September 11, 2009 Author Share Posted September 11, 2009 if it goes back one directory, shouldn't that then be correct? Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916742 Share on other sites More sharing options...
iPixel Posted September 11, 2009 Share Posted September 11, 2009 could you try... <?php include('./includes/footerlinks.php'); ?> i've never seen include used without the (). - but that might just be me. Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916745 Share on other sites More sharing options...
wildteen88 Posted September 11, 2009 Share Posted September 11, 2009 ok, firstly my directories look like this... " root > includes > php and css files " i have a file in the root folder called "about.php" and a line of the code in this file says... <?php include './includes/footerlinks.php'; ?> but i am getting 3 different error messages popping up when i want to view the page that say... Warning: include() [function.include]: Unable to access ./includes/footerlinks.php in /customers/squiblo.com/squiblo.com/httpd.www/footpages/about.php on line 53 Warning: include(./includes/footerlinks.php) [function.include]: failed to open stream: No such file or directory in /customers/squiblo.com/squiblo.com/httpd.www/footpages/about.php on line 53 Warning: include() [function.include]: Failed opening './includes/footerlinks.php' for inclusion (include_path='.:/usr/share/php') in /customers/squiblo.com/squiblo.com/httpd.www/footpages/about.php on line 53 does anybody know why? please help. Where is your includes folder located to? Currently PHP is trying to include footerpages.php in /customers/squiblo.com/squiblo.com/httpd.www/footpages/includes/. Is this correct? Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916836 Share on other sites More sharing options...
cbolson Posted September 11, 2009 Share Posted September 11, 2009 Have you tried getting it from the root like this: include($_SERVER["DOCUMENT_ROOT"]."/includes/footerlinks.php"); Chris Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916838 Share on other sites More sharing options...
holiks Posted September 11, 2009 Share Posted September 11, 2009 First open up squiblo.com/httpd.www/footpages/about.php and edit that line of code to point to the right directory/file......[and]/or browse to ./includes/footerlinks.php and verify if it is indeed present there. [EDIT]: sorry I get my logic gates mixed up Quote Link to comment https://forums.phpfreaks.com/topic/173906-include-errors/#findComment-916912 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.