Problem showing 2 ads

Discussion in 'Co-op Advertising Network' started by webvivre, Dec 14, 2004.

  1. #1
    Have changed the code to:
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('../ad_network.php');
    echo $ad_network[0],$ad_network[1];
    ?>

    But only one advert showing. What have I done wrong?
     
    webvivre, Dec 14, 2004 IP
  2. Foxy

    Foxy Chief Natural Foodie

    Messages:
    1,614
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is how I have done it from the beginning:

    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[0];
    ?> |
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[1];
    ?> |
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[2];
    ?> |
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[3];
    ?> |
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[4];
    ?>

    Which puts a pipe in between as well
     
    Foxy, Dec 14, 2004 IP
  3. webvivre

    webvivre Peon

    Messages:
    249
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok - thanks
     
    webvivre, Dec 14, 2004 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Not the most beautiful way Foxy did it but it works...

    My code to show 5 in PHP:

    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
        echo "<p>Some other internet browsing ideas:<br>";
    	echo ' '.$ad_network[0].' / '.$ad_network[1].' / '.$ad_network[2].' / '.$ad_network[3].' / '.$ad_network[4].'</p>';
    PHP:
    With slashes bewteen them.

    Should work including just once if you use the latest code.
     
    T0PS3O, Dec 14, 2004 IP