Entry
Internet: Provider: Powweb: Cgi-bin: Perl: How to create a program and let it run on your site?
Dec 27th, 2004 22:04
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 28 December 2004 - 05:06 am -------------------
Internet: Provider: Powweb: Cgi-bin: Perl: How to create a program and
let it run on your site?
---
---
Steps: Overview:
1. -Create your Perl program
--- cut here: begin --------------------------------------------------
#!/usr/bin/perl
use CGI qw(:standard);
print header();
print "hello world from Perl on http://www.powweb.com"
--- cut here: end ----------------------------------------------------
1. Possibly first test it on your local machine
1. On an MSDOS command line type
perl <your program name>
2. Give it any name
e.g. test.pl
or
test.cgi
or
test.htm
2. -Upload it to your site
1. Open your FTP program
1. Open Total commander
http://www.ghisler.com
1. Put the transfer mode to 'Text (plain text, html)'
in the menu
2. Upload the file to
the cgi-bin directory on your site
3. Change the file attributes of
your file on your site to 755
1. Select your file on your web site
in your cgi-bin directory
1. -Select from menu option 'File'
1. -Select from list 'Change attributes'
2. -Use the following options
--- cut here: begin --------------------------------------------------
e.g. in Total commander, to get 755, use:
--------------------------------
Owner Group World
--------------------------------
Read x x x
Write x
Execute x x x
--------------------------------
--- cut here: end ----------------------------------------------------
3. -Test your program on your web site
1. Open your browser
1. Type the URL of your program
e.g
http://www.mywebsite\cgi-bin\test.cgi
1. You should now see output similar to the following:
--- cut here: begin --------------------------------------------------
hello from Perl on http://www.powweb.com
--- cut here: end ----------------------------------------------------
----------------------------------------------------------------------