PHP VS ASP.NET - The Beginning.
I always wanted to blog about some technical stuffs here, but I’m afraid it will bore some of the readers to death. Anyway, this is my recent experience and I would like to share with those who are interested out there.
PHP
First I’m gonna talk a bit about the environments that support both server-side scripts. Let’s start with PHP, it’s still my personal favorite after experimenting into ASP.NET. The traditional server environment that I used to play with, would be LAMP (Linux, Apache Web Server, MySQL Database, and PHP). Most of the linux hosting servers out there are running this combo.
My debian machine has exactly the same build.
PHP has windows binary version too for the windows user, which can depend only on IIS web server in windows. I have downloaded version 5.2.1 from php.net download page. The installer is hassle-free, all you need to do is select the right mode, IIS CGI for me.
To check whether php is running fine on your windows machine, simply save a info.php file under C:\inetpub\wwwroot\ , and lauch it with your web browser at http://localhost/info.php. You should see a long list of php server configuration values.
Codes:
<?php
echo phpinfo();
?>
ASP.NET
To get ASP.NET install in your windows, you can download the .NET Framework SDK at this MSN page. Mind you the framework alone, is 141MB on my laptop harddisk, and the SDK is 771MB. After installing both the Framework, and the SDK. You can try save a test.aspx under C:\inetpub\wwwroot\ with the following codes.
Codes:
<html>
<body>
<%= DateTime.Now.ToString() %>
</body>
</html>
Fire up your web browser to http://localhost/test.aspx, and you should see a page showing you current time. There you go.
I will use Visual C# as the primary language in all following updates. Can’t live without curly brackets =} Now you have both server-side scripts supported on your machine. I’ll get into the databases in the next post.
Update: Sorry that I didn’t include any background introduction for this post, I’m setting up both environments on my T-42 laptop, running Windows XP Pro.
Series
PHP VS ASP.NET - The Databases.
PHP VS ASP.NET - Connecting to Database.

Related Post(s)







August 8th, 2007 at 9:56 am
Hello! great idea of color of this siyte!