Welcome Guest. Sign in or Signup

1 Answers

Calling ads from php4 files

Asked by: redbob 634 views Software

We’ve moved from phpadsnew to advertserve and are having trouble getting some of the old php4 files to call the ads.

For the html files we use includes to call up a php file that contains the advertserve code and that works fine.

In the old php4 files the code looks like this:
$DISPLAY['hot_spot'] = $phpAdsNew;
$phpAdsNew = view_raw(‘zone:5′, 0, ”, ”, ’0′, $phpAds_context);

We can’t seem to get an include statement to work for these.

Any thoughts.


1 Answers

  1. renegade_mike on Feb 07, 2008

    You can’t use an HTML include statement in a PHP file. To do a PHP include, try the following:

    <br /><?php<br /><br />include 'includes/ads/ad_468x60_primary_banner.php';<br /><br />?><br />

    For better performance, I suggest changing the ‘ad_468x60_primary_banner.php’ file to a .html file if it doesn’t actually contain any PHP code — that way PHP won’t have to interpret it.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes