SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2000
    Location
    England
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok I have it set up and working....

    I am using the following code :

    <?php

    include("http://www.wannabebig.com/phpAds/config.inc.php3");
    include("http://www.wannabebig.com/phpAds/view.inc.php3");
    include("http://www.wannabebig.com/phpAds/acl.inc.php3");


    ?>

    <a href="../phpAds/click.php3"><img src="../phpAds/phpads.php3?what=468x60" border="0"></a>

    the code 468x60 is for a random banner.....

    OK so thats cool BUT....

    I don't wanna use a href's as it says I should be able to use the php code :

    <?
    view("468x60");

    ?>

    However when I use that I get the following error :

    Fatal error: Call to unsupported or undefined function view() in /home/cloughie/wannabebig-www/test.php on line 13

    BTW line 13 is view("468x60");

    how ever I have included the view php file and it works with te a href so the include must work..

    also what are the advantages of using view rather than a href ? ? ?

    thank you..




    Wannabebig Bodybuilding
    Wannabebig Bodybuilding Forums - Wanna be bigger and stronger?
    At Large Nutrition - nutritional supplements

  2. #2
    Non-Member
    Join Date
    Apr 2000
    Location
    Waco, Texas.
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think view() is a supported function in PHP? Thats why your getting "Call to unsupported or undefined function view()".

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It isn't a php function but it is a phpAd function. I think the reason your are getting an error is that you are calling your includes through http:// protocol so the php is alreay parsed once it gets to the file you are including it in, you need to include it using relative or system paths ie.
    include("../pathtofile/fieltoinclude.php");
    or
    include("/home/pathtofile/fieltoinclude.php");
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  4. #4
    SitePoint Enthusiast Daniel's Avatar
    Join Date
    Dec 1999
    Location
    Belfast
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are calling banners via <a> tags then you can only include one banner per page, you can't create any HTML banners and you can't include alt= parameters. The view () function will let you do all of this.
    Daniel Irvine
    Aroze - Content management simplified.
    F-Free.Net - Free Stuff and Freebies!

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2000
    Location
    England
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hhmmm right check this out for wierdness..

    I changed the paths..

    <?php

    include("phpAds/config.inc.php3");
    include("phpAds/view.inc.php3");
    include("phpAds/acl.inc.php3");

    ?>

    <html>
    <head>

    <title>phpAdsNew demo</title>

    </head>

    <body>

    <a href="../phpAds/click.php3"><img src="../phpAds/phpads.php3?what=468x60" border="0"></a>

    </body></html>

    this works...

    when I however use the same code with the view method I now get the banners come up but with no banner... hhhmmm just an absent image....

    http://www.wannabebig.com/test

    am getting confused..

    Wannabebig Bodybuilding
    Wannabebig Bodybuilding Forums - Wanna be bigger and stronger?
    At Large Nutrition - nutritional supplements

  6. #6
    SitePoint Evangelist
    Join Date
    Jun 2000
    Location
    England
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no ideas ?

    if not I'll just have to use the html link way
    Wannabebig Bodybuilding
    Wannabebig Bodybuilding Forums - Wanna be bigger and stronger?
    At Large Nutrition - nutritional supplements

  7. #7
    SitePoint Enthusiast Daniel's Avatar
    Join Date
    Dec 1999
    Location
    Belfast
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure that you have all your server directories set correctly in config.inc.php3 (I think that's the file). It could be that phpAds is pointing to the wrong file location (right-click on the image and hit Properties to check this). Just a wild guess

    phpAds is just way too buggy for me....
    Daniel Irvine
    Aroze - Content management simplified.
    F-Free.Net - Free Stuff and Freebies!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •