Page 33 - Beginning PHP 5.3
P. 33
Introduction
What You Need to Use This Book
To work through the examples in this book you ’ ll find it helpful to install, or have access to, a Web server
running PHP. Because PHP runs happily on most operating systems, including Windows, Linux, and
Mac OS X, you should have no trouble installing a Web server with the PHP engine on your setup.
Chapter 2 contains easy instructions on how to install PHP and the Apache Web server on Windows,
Linux, and the Mac. You can also use a remote Web server — for example, at your Web hosting
provider — to run the example scripts.
Although this book covers PHP 5.3, the production version available at the time of writing was 5.2.
Therefore some sections of the book — particularly Chapter 2 — contain references to version 5.2.
However, as long as you install a version of PHP greater than 5.1 — whether that ’ s 5.2, 5.3, or
later — you ’ ll be fine.
You ’ ll need a text editor to create and edit your PHP scripts, and many decent free editors are available.
Windows has the Notepad editor built in, which is fine for small projects. On the Mac you can use
TextEdit, or one of the command - line editors such as vi or Emacs. Again, on Linux you can use vi,
Emacs, or another command - line editor, or install one of the graphical text editors available for Linux,
such as Bluefish ( http://bluefish.openoffice.nl/ ).
Using the Command Line
Some parts of the book — notably the chapters on databases, as well as Appendix D — make use of the
command - line interface, or “ shell, ” to enter commands and run programs. This is a powerful tool for
communicating with your system.
Before rich graphical environments came into common use, the only way to interact with computers was
to type commands, one line at a time. You wanted to run a program? There was no icon to click — you
typed the program ’ s name.
Many programs still make use of the command - line interface. For one thing, it ’ s a lot simpler to write
them that way. What ’ s more, many people still find it easier to interact with the command prompt than
with a mouse - driven windowed environment.
In order to access the command line, you need to do one of the following:
❑ On Windows, bring up the Start menu and choose All Programs Accessories Command
Prompt. Alternatively, press Windows+R to call up the Run dialog, type cmd , and click OK.
❑ On Ubuntu Linux, choose Applications Accessories Terminal. (On other Linux distros or
flavors of UNIX, look for a program with a name such as console, terminal, konsole, xterm,
eterm, or kterm. These are all widely used shell programs that can be found on a broad range of
UNIX - based systems.)
❑ On Mac OS X, double - click the Applications Utilities Terminal app in the Finder.
xxxi
9/21/09 9:21:11 AM
flast.indd xxxi
flast.indd xxxi 9/21/09 9:21:11 AM