strange script error?

Discussion in 'Co-op Advertising Network' started by leeds1, Jan 13, 2005.

  1. #1
    Hi

    I run a .shtml site with php includes

    In one of the php includes I want to place the ads

    If I place the code:

    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ($_SERVER['DOCUMENT_ROOT'].'/ad_network.php');
    echo $ad_network[0];
    ?>

    It brings up 2 link ads but the following error message before showing the ads

    Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /home/mydomain/public_html/ad_network.php on line 78


    Any ideas ?
     
    leeds1, Jan 13, 2005 IP
  2. leeds1

    leeds1 Peon

    Messages:
    585
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I took these two lines out of ad_network.php at the end:

    ini_set ('zlib.output_compression', 0);
    echo end ($ad_network);


    It works fine

    Is this OK Shaun ?

    Because the echo end ($ad_network); was also producing a sixth link before the main links were shown ?
     
    leeds1, Jan 13, 2005 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    Yeah, it's fine. Probably means your shtml setup wasn't using .shtml extensions.
     
    digitalpoint, Jan 13, 2005 IP