Chapter 29. Writing PHP Scripts


IN THIS CHAPTER

  • Introduction to PHP

  • Basic Functions

  • Handling HTML Forms

  • Databases

  • Reference

This chapter introduces you to the world of PHP programming, from the point of view of using it as a web scripting language and as a command-line tool. PHP originally stood for personal home page because it was a collection of Perl scripts designed to ease the creation of guest books, message boards, and other interactive scripts commonly found on home pages. However, since those early days, it has received two major updates (PHP 3 and PHP 4), plus a substantial revision in PHP 5, which is the version bundled with Ubuntu.

Part of the success of PHP has been its powerful integration with databasesits earliest uses nearly always took advantage of a database back end. In PHP 5, however, two big new data storage mechanisms were introduced: SQLite, which is a powerful and local database system, and SimpleXML, which is an application programming interface (API) designed to make XML parsing and querying easy. As you will see over time, the PHP developers did a great job: Both SQLite and SimpleXML are easy to learn and use.

Note

Many packages for PHP are available through synaptic. The basic package is just called php5, but you might also want to add extensions such as php5-ldap, php5-mysql, or php5-pgsql. Choose only the extensions you plan to use; otherwise, it will waste system resources.




Ubuntu Unleashed
Ubuntu Unleashed 2011 Edition: Covering 10.10 and 11.04 (6th Edition)
ISBN: 0672333449
EAN: 2147483647
Year: 2006
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net