i want to add footers to all my sites and control them via 1 file so i made a folder called footers and added it to my website i then placed a php file in it called links.php so i had http://website.com/footers/links.php then on my other sites i added this code <?php include ("http://website.com/footers/links.php"); ?> Code (markup): but they dont load the footers it just gives me Warning: include() [function.include]: URL file-access is disabled in the server configuration and other warnings how do i fix that?
that didnt work. Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/hoky/public_html/inc/footer.php on line 4 Warning: include(http://website.com/footers/links.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/hoky/public_html/inc/footer.php on line 4 Warning: include() [function.include]: Failed opening 'http://website.com/footers/links.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hoky/public_html/inc/footer.php on line 4 Code (markup):
It looks like your host has remote file includes disabled most likely for security. I would send them a ticket.
or you could try doing this as a work around.. <? $a = file_get_contents("http://www.somedomain.com/file.php"); echo ($a); ?>
if it is in the same server, use reference <?php include ("footers/links.php"); ?> Code (markup): on an external server $footer=file_get_contents("http://website.com/footers/links.php"; echo $footer; Code (markup):