Phpdynamic

PHP and MySQL Programming Guides, Tutorials, & Articles

Getting Started with PHP

Getting Started with PHP

MAR 10

What is PHP?

PHP is a general-purpose scripting language that is widely used for web development. The official name for PHP is Hypertext Preprocessor, it is embedded directly within an HTML page and interpreted by the web server every time the page is loaded. One of PHP’s greatest advantage is its practical and simple design, allowing both beginning and experienced programmers to quickly develop dynamic content for websites and larger web applications.

PHP was designed exclusively for the web and it has many benefits over its competitors like Microsoft’s ASP, Perl, and ColdFusion. It is open-source as in free software and open-source as in you can access and modify PHP’s source code. As with most open-source software, PHP has great support from the community, with regular bug fixes and security updates, you can check it out at PHP.net. PHP is compatible with a variety of different platforms including Windows, all flavors of UNIX and Linux and can work with many of the popular web server applications like Apache, Microsoft’s IIS and PWS, and Zeus, just to name a few. PHP has built-in support for an array of different database systems like MySQL, Oracle, Microsoft SQL Server, and PostgreSQL including numerous others. It can directly interface with many popular databases and some not so popular ones too. In addition, PHP offers comprehensive support for both object-oriented programming and procedural programming, allowing a developer to quickly implement functionality regardless of their programming style.

Get Up and Running

Our main focus is using PHP as a server-side scripting language for serving up dynamic content, but PHP can also be used as a standalone command-line interpreter for developing local scripts, similar to shell scripting on Linux or batch scripts on Windows.

We will need a web server, a web browser, and PHP before we can actually start developing and testing our scripts. PHP can be installed on all major web servers as a loadable module or a CGI processor, so you can choose from many different web servers depending on your operating system. PHP can be downloaded from Php.net, it is available as a source distribution for UNIX type operating systems and as a MSI installer or zip package for the Windows platform. If you have an account with a hosting provider with Php already installed, you can skip the installation process and simply test your scripts by uploading and running them directly from your account.

In the next section, we’ll show you how to install PHP and the Apache web server on Windows XP. Apache is a very popular open-source HTTP web server that ships bundled with PHP on most UNIX/Linux systems, and is also available for Windows. You can download the latest version of Apache from apache.org, and similar to PHP it can be downloaded as a source code distribution for UNIX type systems or as a pre-compiled Win32 installer for Windows platforms. Microsoft Windows makes a good local testbed for developing your applications and once your project is complete, you can easily port your code to a production server running any flavor of UNIX or Linux with little or no modifications.

We recommend that you download the latest versions of both PHP and Apache for Windows as they contain both the latest patches for security vulnerabilities and up-to-date bug fixes.

  • Share/Bookmark

You can leave a response, or trackback from your own site.

4 Comments

  1. Flashbck on April 08 @ 10:04 pm

    Um…PHP stands for PHP Hypertext Preprocessor. You lose credibility when your second sentence is incorrect.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>