benzetti82 Posted March 15, 2010 Share Posted March 15, 2010 I've never encountered this issue before so any help is much appreciated. I am using PHP includes. I am receiving the following error on my website. Warning: include() [function.include]: Unable to access ../includes/headGlobal.php in /home/apttrain/public_html/index.php on line 4 Warning: include(../includes/headGlobal.php) [function.include]: failed to open stream: No such file or directory in /home/apttrain/public_html/index.php on line 4 Warning: include() [function.include]: Failed opening '../includes/headGlobal.php' for inclusion (include_path='/home/apttrain/public_html/includes/') in /home/apttrain/public_html/index.php on line 4 Warning: include() [function.include]: Unable to access ../includes/headerGlobal.php in /home/apttrain/public_html/index.php on line 12 Warning: include(../includes/headerGlobal.php) [function.include]: failed to open stream: No such file or directory in /home/apttrain/public_html/index.php on line 12 My code looks like the following. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include("/includes/headGlobal.php"); ?> </head> <body> <!--Start Top Sec--> <div id="top_section"> <div id="top_container"> <!--Start Header--> <?php include("/includes/headerGlobal.php"); ?> <!--Stop Header--> Now my PHP.ini file looks like this. allow_url_include = 1 include_path = "/home/apttrain/public_html/includes/" Thanks in advance for your help. Quote Link to comment Share on other sites More sharing options...
premiso Posted March 15, 2010 Share Posted March 15, 2010 Since the include path is to the includes, do you really need the /includes when including it? Perhaps remove the /includes from your include path and see how that works out for ya. Quote Link to comment Share on other sites More sharing options...
benzetti82 Posted March 16, 2010 Author Share Posted March 16, 2010 Thanks Premiso that worked! Quote Link to comment 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.