cl58 Posted February 25, 2010 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
Byron Posted February 25, 2010 Posted February 25, 2010 You need to use the relative path. <?php include("footer/footer.php"); ?>
cl58 Posted February 25, 2010 Author 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?
Byron Posted February 25, 2010 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.
cl58 Posted February 25, 2010 Author 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
Byron Posted February 26, 2010 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
cl58 Posted February 26, 2010 Author 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.
Byron Posted February 26, 2010 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now