Wiley PHP5 and MySQL Bible 978-0-7645-5746-0 Manuale Utente

Codici prodotto
978-0-7645-5746-0
Pagina di 16
Why PHP and
MySQL?
T
his first chapter is an introduction to PHP, MySQL, and the inter-
action of the two. In it, we’ll try to address some of the most com-
mon questions about these tools, such as “What are they?” and “How
do they compare to similar technologies?” Most of the chapter is
taken up with an enumeration of the many, many reasons to choose
PHP, MySQL, or the two in tandem. If you’re a techie looking for some
ammunition to lob at your PHB (“Pointy-Haired Boss” for those who
don’t know the Dilbert cartoons) or a manager asking yourself what
is this P-whatever thing your geeks keep whining to get, this chapter
will provide some preliminary answers.
What Is PHP?
PHP is the Web development language written by and for Web devel-
opers. PHP stands for PHP: Hypertext Preprocessor. The product was
originally named Personal Home Page Tools, and many people still
think that’s what the acronym stands for. But as it expanded in scope,
a new and more appropriate (albeit GNU-ishly recursive) name was
selected by community vote. PHP is currently in its fifth major
rewrite, called PHP5 or just plain PHP.
PHP is a server-side scripting language, which can be embedded in
HTML or used as a standalone binary (although the former use is
much more common). Proprietary products in this niche are
Microsoft’s Active Server Pages, Macromedia’s ColdFusion, and Sun’s
Java Server Pages. Some tech journalists used to call PHP “the open
source ASP” because its functionality is similar to that of the
Microsoft product — although this formulation was misleading, as
PHP was developed before ASP. Over the past few years, however,
PHP and server-side Java have gained momentum, while ASP has lost
mindshare, so this comparison no longer seems appropriate.
We’ll explore server-side scripting more thoroughly in Chapter 2, but
for the moment you can think of it as a collection of super-HTML tags
or small programs that run inside your Web pages — except on the
server side, before they get sent to the browser. For example, you can
use PHP to add common headers and footers to all the pages on a
site or to store form-submitted data in a database.
1
1
C H A P T E R
In This Chapter
Understanding PHP and
MySQL
A history of PHP
A history of MySQL
The benefits of using
PHP and MySQL
PHP and MySQL: A
competitive advantage 
03 557467 ch01.qxd  4/5/04  11:06 AM  Page 3