Let’s jump right in with a PHP script. To begin, open your favorite text editor. Like HTML documents, PHP files are made up of plain text, so you can create them with any text editor, such as Notepad and HomeSite on Windows, Simple Text and BBEdit on Mac OS, or VI and Emacs on Unix operating systems. Most popular HTML editors provide at least some support for PHP.
Keith Edmunds maintains a handy list of PHP-friendly editors at http://phpeditors.linuxbackup.co.uk.
Type in the example in Listing 3.1 and save the file. We’ll name our file listing3.1.php.
1: <?php 2: phpinfo(); 3: ?>
The code in ...