Skip navigation

STANFORD UNIVERSITY

INFORMATION TECHNOLOGY SERVICES

Example CGI Scripts

printenv.pl

Demo Perl script that just prints the environment variables that the server passes to the script. This scripts get installed in your cgi-bin directory by default and is useful for testing.

printenv.sh

Demo Bourne Shell script that just prints the environment variables that the server passes to the script.

phpinfo.php

Demo PHP script that prints out the all the PHP execution environment variables including internal PHP variables and settings. This scripts get installed in your cgi-bin directory by default and is useful for testing.

guestbook.pl

Demo Perl script that shows usage of CGI.pm and user interaction through a form.

netsmtp.pl

Demo Perl scrip that shows how to send mail from your CGI program.

Last modified Monday, 12-Apr-2004 09:17:05 PM

Stanford University Home Page