Quote:
|
Originally Posted by silver211
When i created a test.php is work.. but it's not work with my main page.
you can see below what the code is insert in my page .. (Phpinfo .. work.)
</table>
<br />
<?php
if (@include(getenv('DOCUMENT_ROOT').'/phpAdsNew-2.0/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '_blank', '', '1', $phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw['bannerid']);
echo $phpAds_raw['html'];
}
?>
<div align="center">
|
Keep it simple....
Make a page where you will put your phpadnews script.
Call it phpadnews.php
Check if it works and banners rotate.
If so, the use the :
<?php include("phpadnews.php"); ?>
where you want the banners to show in your main page. Change your mainpage extension to php, otherwise it will not work.
You could even include this in a header that then could be included in all your pages
OR:
in a .htaccess file, add:
AddType application/x-httpd-php .html