Web Hosting Talk







View Full Version : Include content server-wide & another question


P-nut
01-14-2005, 08:56 AM
Okay - I would like to provide ad code for people I am hosting for free. I have a file that holds my code and would like them to include it on their page, either via SSI or PHP includes.
My question is how to write the code so that anyone on my server can insert it into their page and it will display the ad? Right now I have this:

<!--Begin Code-->
<!--#include virtual="http://blah.tld/ads/light.txt"-->
<!--End Code-->

Which doesn't show anything at all. I don't want to use mod_layout if I can avoid it.

My 2nd question has to do with an error I am receiving on a site using Mambo. I don't want my Mambo template to wrap around my bulletin board template, so I inserted this bit of code:
<?php if ($_REQUEST['option'] != "com_bb") { ?>

Works beautifully, except on the home page, where I get this error:
Notice: Undefined index: option in c:\program files\easyphp\www\efans\templates\EFans\index.php on line 60

Since obviously my index page doesn't use the whole option=com_whatever&task=etc format the rest of the site uses. Is there a better way to write the above code? If not, is there another piece of code I can include so I don't get this error?

Thanks! :D

w3dwebhost
01-17-2005, 12:51 AM
<!--Begin Code-->
<?php
include 'http://blah.tld/ads/light.txt';
?>
<!--End Code-->