www.webdeveloper.com
Results 1 to 3 of 3

Thread: Execute CGI

  1. #1
    Join Date
    Nov 2002
    Posts
    7

    Execute CGI

    I'm trying to execute a CGI script from another CGI. I can type, for example,

    ---------------------------
    exec 'http://forums.webdeveloper.com/newthread.php';
    ---------------------------

    but I am not able to type

    ---------------------------
    exec 'http://forums.webdeveloper.com/newthread.php?action=newthread';
    ---------------------------

    Does anyone know a command that will let you do that?

    Thanks!

  2. #2
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    exec 'http://forums.webdeveloper.com/newthread.php';

    This won't actually do anything other than throw an error. exec() executes a system command, not submit HTTP requests.

    If you want to move your page to another CGI script do this:

    assuming you havn't closed the HTTP header yet.

  3. #3
    Join Date
    Nov 2002
    Posts
    7
    Ah hah! You're right, after further testing I found the

    exec 'http://forums.webdeveloper.com/newthread.php';

    wasn't doing anything. On the bright side, the

    print "Location: http://forums.webdeveloper.com/newt...n=newthread\n\n";

    works exactly how I need it to! Thank you so much!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles