Creating CGI script in Corel LINUX
You can create CGI script in Corel LINUX. You can code the CGI script in the text editor that is available on Corel LINUX. The example below will show you how to create CGI script that creates a simple Web page. The name of the Web page is "My dynamic page." This Web page displays the ASCII text "Hello There."
To create CGI script in Corel LINUX
1. Click Application Starter, Advanced Editor.
2. Type the following lines of code in the Advanced Editor:
#! /usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head><title> My dynamic page</title></head>\n";
print "<body> \n";
print "<h2>Hello, There!</h2> \n";
print "</body></html>\n";
3. Save the file and call it:
hello.cgi
Notes
You must include the MIME header, Content-type:text/html, at the top of all CGI scripts.
You must change the file permission of hello.cgi before you can execute it. For information on changing the permission of a file, see "Changing the file permission of a Perl program."
Make sure you place the hello.cgi file in the directory specified in the ScriptAlias directive. For information about the ScriptAlias directive, see the ScriptAlias directive in "Using the srm configuration file."