Tuesday, September 13, 2011

Hello World in Web Languages




<?php
  // Hello World in PHP
  echo 'Hello World!';
?>


<?
// Hello World in PHP + GD library
header("Content-type: image/gif");
$rscImage    = imagecreatetruecolor(80, 25);
$intFontC    = imagecolorallocate($rscImage, 255, 255, 255);
$intBGC        = imagecolorallocate($rscImage, 0, 0, 0);
imagestring($rscImage, 2, 5, 5, "Hello World!", $intFontC);
imagegif($rscImage);
imagedestroy($rscImage);
?>



HTML
<HTML>
<!-- Hello World in HTML -->
<HEAD>
<TITLE>Hello World!</TITLE>
</HEAD>
<BODY>
Hello World!
</BODY>
</HTML>

ASP-C#

<% @ Page Language="C#" %>
<% ="Hello World!" %>


Hello World for Microsoft ASP (in JavaScript)

<%@ language="javascript" %>
<html><body>
<%
Response.Write('Hello World!');
%>
</body></html>




ASP.NET

<%= "Hello World!" %>

No comments:

Post a Comment