Flylib.com

Books Software

 
 
 

PHP Programming for Windows (Landmark (New Riders)) - page 9

I l @ ve RuBoard

Foreword

In my life, I have known a lot of programming languages. Some have been great friendships all my life, such as C, and others, such as Prolog, were mere student flirtations.

I first met PHP in 1999 when I was still working with Active Server Pages, and I was immediately struck by its simplicity and elegance . PHP seems to combine some of the best features of JavaScript and Perl while avoiding many of their faults. In PHP, strings are just another data type (unlike JavaScript, where they are objects), and PHP uses a clean C-like syntax that is easy to read (thereby avoiding Perl's eccentricities).

As a Windows programmer, I was delighted by the large library of user - contributed extensions available for PHP. What would have required the purchase of commercial libraries in ASP was available for free in PHP, and with source code to boot. I felt that Windows programmers could gain a lot by using PHP, so in August 2000 I started one of the first web sites to cover cross-platform PHP scripting and using PHP on Windows ” http://php.weblogs.com.

While using PHP, I started to port some of my ASP code to PHP. Since I programmed primarily in JScript, it was mostly a matter of putting $ signs in front of all the variables . However, I began to miss one of my favorite tools in Windows ”ADO, Microsoft's set of objects for manipulating databases. So I developed the PHP database wrapper library called ADOdb, which provides functionality similar to that of ADO for PHP and runs on both Windows and UNIX. To my pleasant surprise, it seems that many PHP programmers are also Windows programmers, and thousands of people have downloaded and are using this open -source library.

I am very pleased to see that, in the same spirit of promoting cross-platform PHP, Andrew Stopford has spent a lot of time and effort coming up with this book on PHP for Windows. He even covers how PHP can work with the latest Microsoft technologies such as .NET, which is complementary to PHP because it is language-neutral. I hope this book proves useful, both in your home and as a reference at work.

”John Lim

I l @ ve RuBoard
I l @ ve RuBoard

Introduction

PHP is a word not commonly used in sentences that also have the word Windows. PHP is a very popular open-source programming language for the web. It is used with other open -source software, such as the Linux OS and the Apache web server (plus, it runs extremely well on these platforms). But Windows itself is often left out. You don't often find books or web sites that focus on Windows PHP development. Rather, the focus is largely on developing on Linux platforms.

Why should that be so? PHP is as capable of running both on a Windows desktop and in a Windows enterprise as any commonly used language, such as ASP and ColdFusion, to mention a couple. In addition, PHP can cope with all the features a Windows web developer needs, such as COM, LDAP, ODBC, and ADO.

You can successfully create solutions with other open-source technologies (the MySQL database, for example) that run on both platforms. However, sometimes a developer focuses on one platform and needs to take advantage of what that platform offers.

This book addresses these issues and shows you how to go about using PHP to take advantage of the Windows platform.

I l @ ve RuBoard
I l @ ve RuBoard

Who Should Read This Book

This book is aimed at developers who focus largely on Windows as their development platform and who want to take advantage of some of the features it offers. The book also appeals to developers who use Windows as a staging platform before they upload their solution to a Linux server. (If this is you, please read the next section.)

I l @ ve RuBoard