SpaceGirl said:
<%
myMessage = "Hello World"
myDate = date
myTime = time
%>
<p><%=message%></p>
<p><%=myDate%></p>
<p><%=myTime%></p>
ASP is the easiest language on the planet. After all, it's BASIC
It's almost exactly the same in PHP:
<?
$myMessage = "Hello World";
$myDate = date("d-m-y");
$myTime = date("H:i:s");
?>
<p><?= $message ?></p>
<p><?= $myDate ?></p>
<p><?= $myTime ?></p>
However, ASP gets complicated very quickly. For example, today I needed to
write an ASP (VB)script to list the files in a directory ("/uploads") on
the webserver, not knowing the absolute path to the directory.
I had to use this code:
<%
Dim objFSO, objFolder, objFile, f
Response.ContentType = "text/plain"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
f = Server.MapPath("/uploads")
Set objFolder = objFSO.GetFolder(f)
For Each objFile in objFolder.Files
Response.Write objFile.Name & Chr(13) & Chr(10)
Next
%>
Whereas in Perl I could have just done:
#!/usr/bin/perl
print "Content-Type: text/plain\n\n";
system("ls -1 uploads");
Easy peasy.
PHP would be just as easy:
<?
header('Content-Type: text/plain');
print `ls -1 uploads`;
?>
Perl makes easy things easy and hard things possible. VBscript tends to
make easy things easy and moderately complicated things unthinkable.