Monday, July 7, 2008

Watz PHP?

What is PHP?
PHP stands for ‘Hypertext Preprocessor’ which is actually a recursive acronym. It is an open source and most widely used scripting language for the web. In another words, PHP is a server side scripting language and can be embedded into HTML code which is parsed and processed when the page is requested.
Why is it popular?
The main credit goes to it being an open source language and ease of use. Practically, PHP is much easier to learn and code when compared to other scripting languages. It is fast and flexiable. Like every other language, there is a certain degree of learning curve associated with PHP. Refer to Features of PHP.
Where to start?
Before you start with basics of PHP programming, it is important that you understand the purpose and usability of programming in PHP. You should know what PHP can do for you and what it is not meant for. You may also want to learn about installing PHP on your system to begin PHP programming and web development, but first, let’s start with Introduction to PHP Programming.
What to expect?
We intend to provide you with all basic information you will need to start learning PHP right away. PHP as you know is best suited for web development and hence we will also include several examples for you to get an insight into programming PHP with MySQL (with examples) for web development. We are also expanding all our sections on PHP so as to offer as much as we can to our readers.
What can I do with PHP?
PHP, as we told earlier, is a server-side scripting language. The client will always see and interact with HTML in his browser. PHP is capable of generating dynamic HTML pages and hence it can output HTML which servers as a presentation layer and in the backend, on the server it can continue to process all requests made by the client. These requests could be processing of form, handling cookies, uploading files, generating dynamic HTML by querying a database etc.
Popular Features of PHP
Some of the most popular features of PHP are as mentioned below:-
PHP works on multiple Operating Systems. Some are Linux, manu Unix flavors, BSD, Mac OS X and many more..Plenty of Web Servers are supported. Some are Apache, IIS, Netscape iPlanet and many others..Use it as a procedural programming or object oriented programming. Choice is yours!Dynamic generation of HTML, PDF, Flash, Text, CSV, XML and others..Support for numerous databases like MySQL, Oracle, MS-SQL, Sybase, PostgreSQL and many others..Interaction with services like LDAP, POP3, SMTP etc..PHP comes along with PEAR (PHP Extension and Application Repository) which is like a library of code, procedures for handling error, components which can be reused.
Not only these, but there are many more features and abilities of PHP which you will discover as you go along.
PHP can also be used from command line to execute php scripts. This is similar to running a UNIX shell or a perl script from command to accomplish tasks like taking backup of files, analyzing log files, generating a list of files and folders etc.
PHP is capable of doing much more than what read above. You can use it on command line interface to do most of the tasks stated above, without a browser, of course. PHP can also be used to create rich GUI applications using PHP-GTK kit. This requires knowledge of advanced PHP features.
Let’s look at some of the popular features of PHP.
Installing PHP
Requirements

All you need is a working system! Since PHP supports wide variety of operating systems, it should not be a problem to find the right PHP version for your operating system. For web based PHP applications, you will need some or all of the following:-
A Web Server (for serving pages off a web site)
PHP (the PHP core)
A Database Server (Plenty of databases are supported)
A text editor to edit PHP files (This will ease your development but optional)
Your options
You can either choose to download all the above three components and install them individually or you can download pre-configured packaged applications which will install Apache, MySQL and PHP as a single component. Some of the popular applications are EasyPHP, XAMPP and WAMP.
If you do not have prior installation experience of Apache, PHP and MySQL, we recommend that you start by installing any of the above packaged applications for a quick start. The installation notes are available on their respective web sites.
However, if you choose to install Apache, MySQL and PHP manually, then follow these links to download and configure these applications.
Apache
Apache is available as a free download from Apache web site. We recommend you download a stable release for your operating system. For Windows OS, download MSI installer which is quick to install.
PHP
PHP is available as a free download from PHP web site. You should look for stable release for your OS.
MySQL
MySQL database is available for download at MySQL web site and you are looking for a stable release for this as well.
PHP Text Editor
A google search for PHP editors will produce many results and depending on your choice, you can either opt for a free or a commercial editor. I personally recommend PSPad for its ease of use and functionality.

No comments: