cl58 Posted February 25, 2010 Share Posted February 25, 2010 I just put the code <?php include("http://cl58tools.co.cc/footer/footer.php"); ?> in my index.php file and got the following error(s). Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/cl58tool/public_html/splash/index.php on line 110 Warning: include(http://cl58tools.co.cc/footer/footer.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/cl58tool/public_html/splash/index.php on line 110 Warning: include() [function.include]: Failed opening 'http://cl58tools.co.cc/footer/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cl58tool/public_html/splash/index.php on line 110 Quote Link to comment Share on other sites More sharing options...
Byron Posted February 25, 2010 Share Posted February 25, 2010 You need to use the relative path. <?php include("footer/footer.php"); ?> Quote Link to comment Share on other sites More sharing options...
cl58 Posted February 25, 2010 Author Share Posted February 25, 2010 but i want to use that file in some files in subdomians. Do I have to copy the directory to each subdomain directory? Quote Link to comment Share on other sites More sharing options...
Byron Posted February 25, 2010 Share Posted February 25, 2010 but i want to use that file in some files in subdomians. Do I have to copy the directory to each subdomain directory? If your subdomains are being used as addon domains than you will. EDIT: I take that back. All you need to do is set the correct relative path. Something like this: <?php include("/home/cl58tool/public_html/footer/footer.php"); ?> or the system path <?php include("/home/cl58tool/public_html/footer/footer.php"); ?> I just tried an include on my addon domain to my main domain without any problems no matter how I accessed that page. Quote Link to comment Share on other sites More sharing options...
cl58 Posted February 25, 2010 Author Share Posted February 25, 2010 From u.cl58tools.co.cc Code: <?php include("/home/cl58tool/public_html/footer/footer.php"); ?> Warning: include(/home/cl58tool/public_html/footer/footer.php) [function.include]: failed to open stream: No such file or directory in /home/cl58tool/public_html/u/index.php on line 46 Warning: include() [function.include]: Failed opening '/home/cl58tool/public_html/footer/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cl58tool/public_html/u/index.php on line 46 Quote Link to comment Share on other sites More sharing options...
Byron Posted February 26, 2010 Share Posted February 26, 2010 Are you sure this is the correct path? /home/cl58tool/public_html/footer/footer.php I'm not seeing your footer page when I go to this url: http://cl58tools.co.cc/footer/footer.php Quote Link to comment Share on other sites More sharing options...
cl58 Posted February 26, 2010 Author Share Posted February 26, 2010 no, its not correct. I forgot i moved it! I feel really stupid. Anyway, is there a reason you don't allow http includes? It's as simple as changing one Boolean in the php.ini file. Quote Link to comment Share on other sites More sharing options...
Byron Posted February 26, 2010 Share Posted February 26, 2010 Anyway, is there a reason you don't allow http includes? It's as simple as changing one Boolean in the php.ini file. Probably to keep from including pages from other sites and the relative path is a little quicker than another http request. Quote Link to comment Share on other sites More sharing options...
cl58 Posted February 27, 2010 Author Share Posted February 27, 2010 ah, okay. Works for me. 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.