SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2000
    Location
    xyz
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In order to run the ads by my provider I have to insert the following code in my shtml pages:
    <!--#exec cgi="/banner/banneradventure.cgi"-->

    However, I just set up a PHP-based forum and would like to show my ads there as well. The code above doesn't seem to work. Is there a PHP alternative to server side includes? Since it's a server-side language, I'm pretty sure there must be

    Thanks in advance

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try

    Code:
    exec("/banner/banneradventure.cgi");
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2000
    Location
    xyz
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I should've thought of that myself Thanks Kevin!

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using the exec() function to get a cgi script to run but it doesn't work

    here's my code:
    <?php exec("/cgi-bin/ads.cgi"); ?>

    the path to the script is correct b/c i use:
    <!--#exec cgi="/cgi-bin/ads.pl" --> in an shtml file in the same dir and it works fine.

    i'm running php3

    any help's appreciated!

    SaNg N.
    sang@vinasite.com


  5. #5
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try virtual() instead of exec().
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  6. #6
    SitePoint Addict SniperUK's Avatar
    Join Date
    Jul 2000
    Location
    UK
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try adding the full URL to the script then it should work!
    <?php exec("http://yourdomain.com/cgi-bin/ads.cgi"); ?>
    or use
    <? include("http://yourdomain.com/cgi-bin/ads.cgi"); ?>

    It should work!


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
  •