BatchKi Reference Manual
next up previous contents index home


Common Gateway Interface (CGI)

To illustrate the Common Gateway Interface (CGI) invocation of the BatchKi numerical engine, the following edited fragment shows a part of the Perl source code extracted from file [Apache]/cgi-bin/batchki/generic/user.pl:

#!/usr/bin/perl

package bki;
use strict;
...
# 1. Set the global variable ${bki::user} to the current user ID
# 2. Create the XML data file "./input/${bki::user}data.xml"
#    from elements of an HTML form
...
#------------------------------------------------------------------
sub run_program
{
   my ($file, $command, $status);

   $file = "./input/${bki::user}data.xml";
   $command   = "../batchki.exe $file web . $bki::user ../../../htdocs/output";
   $status = system ($command);
   return $status;
}

The above code fragment assumes the default layout of directories in the Apache HTTP server.


next up previous contents index home
biokin.com/batchki/manual/reference/html/node13.html
Petr Kuzmic | Jul 12 2008