Im setting up a proxy network and have a template. It uses a config.php file to contain the variables e.g. adsense code etc I want something like that but where it gets other details from a external file located on simon369.info I want the footer text to load from simon369.info/footer.php so i can change all the sites footers with only editing one file This cant interupt with the /config.php thing already on If you can post here saying what code to put where i want the footer to go and if there is anything i need to place in the footer.php then i will pay you $2 for the first person to do this Thanks
This will display the contents of footer.php: <?php echo @file_get_contents("http://simon369.info/footer.php"); ?> Code (markup):
IT didnt work This is what i had, So i wanted it to say copyright 2007 then the site title (that works) then load the contents of the file. <div id="footer">© 2007 <?php echo($title); ?> - <?php echo @file_get_contents("http://simon369.info/footer.php"); ?></div> Code (markup): It doesnt load the contents Thanks
does $content=file_get_contents("http://simon369.info/footer.php",FALSE,NULL,0); echo $content; PHP: work?
If you have PHP4, this should work, if the above does not: include("http://simon369.info/footer.php"); Code (markup):
Nope that didnt work either im affraid I have to go bed now anyway cos its late Will be back tomorrow
I suggest you check you are doing it correctly, as: echo file_get_contents("http://www.simon369.info/footer.php"); PHP: will work...
Check if allow_url_fopen is on, also try: error_reporting(E_ALL); ini_set('display_errors', true); echo (file_get_contents('http://simon369.info/footer.php')) ? 1 : 0; PHP:
non of the above work and when i try what krt says this is what i get Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/simoninf/public_html/index.inc.php on line 100 Warning: file_get_contents(http://simon369.info/footer.php) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/simoninf/public_html/index.inc.php on line 100 0 Code (markup): What does that mean Thansk
I think this means you need to go to your php.ini and change "allow_url_include = Off" to "allow_url_include = On"