ASP

JSP

VBScript

Javascript

Jscript

Java

Javabeans

XML

CGI

Perl

PHP

ColdFusion

    Περιγραφή        Εγκατάσταση        Παράδειγμα        Συγκρίσεις

To παραδειγμα που ακολουθει ειναι ενα απλο cgi script που παιρνει σαν εισοδο ενα μηνυμα που γραφει ενας χρηστης σε μια html form , το αποθηκεύει στο δίσκο και επιστρρέγει ενα μικρο μηνυμα πισω στον ιδιο χρηστη.

The CGI source code

#!/usr/local/bin/perl
 
$datafile = "/home/user/datafile.txt";
 
&parse_form_data (*form_field);
 
open (DATAFILE, ">>$datafile");
print DATAFILE "$form_field{'username'}, $form_field{'secret'},
$form_field{'gender'}, $form_field{'sport'}, $form_field{'children'},
$form_field{'comments'}\n";
close DATAFILE;
 
print "Content-type: text/html", "\n\n");
 
print <<"EOF";
 
<html>
<head>
<title>Web Form Submission</title>
</head>
 
<body bgcolor="#ffffd0" text="#000000">
 
<center>
<h1>Web Form Submission</h1>
</center>
<hr>
<p>Thank you for filling in this form. In this simple example, nothing
has been done with your details, however in a real system, your details
could be sent to someone via email, or stored in a database, or a variety
of other different options.</p>
 
<p>Follow this link to return to the
<a href="pub_e3a.html">previous page</a>.</p>
<hr>
<center>
<font size=-1>&copy; 2001. University of Queensland, Australia.</font>
</center>
</body>
</html>
EOF
 
exit;