I am using Apache server in Fedora-20. I will try to run perl-cgi program in my local server. But its not working, I have to attached my html program and perl program.
html program:
<html>
<head><title>Demo</title>
</head>
<body>
<form action="/cgi-bin/fam.cgi" method="post">
<input type="text" name="username">
<input type="submit">
</form>
</body>
</html>
This program ran properly, it gives as output.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "hello world\n";
But when i was passing parameter, its not working.this program is not working.
#!usr/bin/perl -wT
use CGI;
my $username = param('username');
print header;
print start_html("Perl page");
print h2("hello $username");
print end_html;
what is my mistake, I want to install any modules. I already installed cgi module. suggest me for any solution.
Aucun commentaire:
Enregistrer un commentaire