TechMynd, Fresh Downloads and Latest Technology News, Stuff That Works | Downloads, Tips & Tricks, Softwares, Programming, Resources, IT, Computer, Resources, Freewares

Printing Html in CGI



Simple html output from cgi script

#!/usr/bin/perl -wt
print “Content-type: text/html\n\n”;
print “<html><head><title>Hello World</title></head>\n”;
print “<body>\n”;
print “<h2>Hello, world!</h2>\n”;
print “</body></html>\n”;

HTML in CGI Second Example

#!/usr/bin/perl -wt
print “Content-type: text/html\n\n”;
print <<EndOfHTML;
<html><head><title>Test Page</title></head>
<body>
<h2>Hello, world! This is cgi and html printing</h2>
</body></html>
EndOfHTML
print end_html;

Download Example

Tags:
Posted in: CGI
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0

Related Posts


Post a Comment

Comment will appear here after approval, Thanks for patience

  Subscribe Via RSS
  Subscribe Via Email

Add to Technorati Favorites

Donate towards TechMynd web hosting Bill!

Advertisement