Hello, I am comepltely new to this so spare me. I installed everything flawlessely and put the links in a page called catalog/affiliates.php So I try doing this but now on my index page. I copy and pasted the same code to my footer.php which was located in a different folder (catalog/includes/footer.php) and it does not work. It states "You must set the ad network .txt file to be writable (or file is not within path)" So I copy the .txt and .php file that digital point provides into catalog/includes and set the proper permissions and it still does not work and shows the same error. What am I doing wrong here? Thank you.
You may need to put the full file path (not URL) to the ad_network PHP file within the include statement.
the .php and .txt file from DP was inserted in /catalog I then entered the code <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network_318.php'); echo $ad_network; ?> Code (markup): into /catalog/affiliates.php - Everything worked fine. Now I want to enter the same code into catalog/includes/index_footer.php I tried but it said that either the .txt file didnt have correct permissions or the pathw as not right. I tried copying the .txt file and .php that came from DP into catalog/includes and setting the permissions right again but it still did not work. Any suggestions?
Thanks for the help - but i'm afraid that did not do the trick. Maybe i'm changing it incorrectly. I changed if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS; $ad_file = 'ad_network_ads_314.txt'; Code (markup): to if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS; $ad_file = 'includes/ad_network_ads_314.txt'; Code (markup): and still got the same error.
It would need to be the full path to the file. For example one of my servers would be something like: /home/sites/www.digitalpoint.com/web/includes/ad_network.php Another thing you could try is just to put the ad_network.php file in the root of your site, because the code will automatically go up levels to look for it if it's not in the current directory.
That's the weird thing. the ad_network.php file was in the root already - it worked fine for .com/affiliates.php I tried putting in the full path like this if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS; $ad_file = 'www.crazyjordans.com/public_html/includes/ad_network_ads_314.txt'; Code (markup): and still got the same problem. I then tried also changing the given code to <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('www.crazyjordans.com/public_html/includes/ad_network_318.php'); echo $ad_network; ?> Code (markup): and it still didn't work. index_footer.php is in /includes but my acutal index is in the root - maybe that has something to do with it - I don't know. I'm lost =|
You would need to put the FULL path (from the root of the server). So you would need to find what that is.
Thank you for your time. It still does not work. This time only it does not come up with any error: I changed $ad_file = 'ad_network_ads_314.txt'; for ($i = 0; $i <= 11; $i++) { $p = substr ('../../../../../../../../../../', 0, $i * 3); Code (markup): to $ad_file = '/home/crazyj61/public_html/includes/ad_network_ads_314.txt'; for ($i = 0; $i <= 11; $i++) { $p = substr ('../../../../../../../../../../', 0, $i * 3); Code (markup): in ad_network_314.php and added <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('/home/crazyj61/public_html/includes/ad_network_319.php'); echo $ad_network; ?> Code (markup): to my footer.php file - now this is starting to frutrate me. Any other suggestions?