Ad Rotator Trouble – Fatal Error Call to Undefined Function
-
I was successful in installing and activating Word Press. I also installed the following Ad Rotator Plugin from Augsuman Chakraborty:
<?php
/*
Plugin Name: Ad Rotator
Plugin URI: https://blog.taragana.com/index.php/archive/wordpress-plugin-adrotator-rotate-your-ads-including-adsense-dynamically/
Description: Rotates Ads randomly from a specified text file
Version: 1.0
Author: Angsuman Chakraborty
Author URI: https://blog.taragana.com/
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
*/
/* Usage: echo getad(‘Ad File Name’); */
function getad($ad = ”) {
$ad = trim($ad);
if(strlen($ad) > 0) {
$ad = ABSPATH . “wp-content/” . $ad . ‘.txt’;
if(file_exists($ad)) {
$ads = file($ad);
return $ads[rand(0, sizeof($ads)-1)];
}
}
}
?>HOWEVER, I can’t get my text file to run on my web page. I am getting Fatal Error: Please visit https://www.myspiritcandles.com
Please note that this is a test site and doesn’t really make sense. I’m trying to get the Ad Rotator to work so I can apply in different areas.
Thanks for your help!
- The topic ‘Ad Rotator Trouble – Fatal Error Call to Undefined Function’ is closed to new replies.