[icoFolderApps.png]Program files
[icoHelp.png] Help[icoPHP.png] PHP
 PHP (9oct2010)
PHP is a server side scripting language. Historically web servers were meant to just deliver prebuilt HTML files to clients; with PHP pages you can make the server do some job like perform calculations, creating files, query a database and any task you could expect from a scripting language, with particular attention to the HTML code generation. PHP consists as processing instructions blocks embedded in HTML code. From version 5 PHP is a fully object oriented language. The PHP interpeter is usually executed by a web server (like Apache), but nothing stops you to install the interpreter in your system and use it as a cross-platform scripting language. The standard mechanism is:
  • A client requests a page to a server
  • The server parses the PHP scripts embedded in requested page
  • The dynamically generated HTML is returned to client
To experiment with PHP and try my examples, follow these steps:
  • Install a web server with PHP module, and a database server; the fast way is the following:
    • Download XAMPP installer for your platform
    • Install it somewhere. I have chosen to use a virtual pc (Virtualbox), connected to my real PC with a "bridged adapter" interface
  • Put your PHP files in the server C:\xampp\htdocs directory
  • Now you can access those files using a browser, using the proper URL, for example:
    • My web server is a pc named vbox_xpsp3, whose IP address is, but yours probably is localhost ( if the web server is running on your local PC
    • Put the file basic.php (that one in [phpfiles]PHP files) in C:\xampp\htdocs, then open the browser and access it using either http://vbox_xpsp3/basic.php or
    • Now you're ready to experiment and read a good PHP book...

See also
[phpfiles]PHP files