View Single Post
Old 01-11-2005, 07:54 PM  
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Punta Cana, DR
Posts: 29,927
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
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote