1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Validates but messes up my forum

Discussion in 'Co-op Advertising Network' started by caroline, Dec 11, 2004.

  1. #1
    Take a peek at my Forum! http://www.tombraider4u.com/tomb-raider-forum.php

    The error does nothing, I mean the forum works fine, but I have these awful lines of text at the top of the page! Is there any way I can suppress error reporting (who cares anyway) or resolve the apparent conflict between the two files?

    Here is the code I am using:

    <?


    ini_set ("include_path", ini_get ("include_path") .

    ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[0];
    chdir("/dh/solidclient"); require_once "SolidClient.php";
    ?>

    If I put the first bit of code second, the ads do not appear and the error I get is that the ad_network_ads.txt files is not writable (yeah right!), but this time the real errors are suppressed. Help!!!
     
    caroline, Dec 11, 2004 IP
  2. caroline

    caroline Peon

    Messages:
    376
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey, I made it. I just needed to add " error_reporting(0); " infront of commands. I really need to learn some basic php. :rolleyes:
     
    caroline, Dec 11, 2004 IP
  3. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Or better put @ signs in front of functions the *may* cause errors. That's the best practice, because by turning off error _reporting completely, you'll never know when you have a real error somewhere else in the scripts. That can lead to much confusion for yourself.

    i.e:
    @chdir("/dh/solidclient");

    I'd suspect the ad_networks.txt is not writable still -- whereever php is looking for it. Read the message; it should tell you where it's trying to open it and it's most likely not there.

    Also, keep in mind that php's file functions are file system oriented so when you specify a file it's relative to the users root and not to the web servers document root.
     
    Matts, Dec 11, 2004 IP