Datasheet

P1: KTX
WY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44
Chapter 1
Figure 1-18
Testing and Troubleshooting
Testing your installation of PHP is really as simple as writing a small PHP program and running it. Create
a small PHP le to use for tests. Write the following code in it:
<?php
echo "Hey, it worked";
?>
Save the le as test02.php in any folder within wwwroot (or an appropriate folder if you happen to be
running some other OS/Web server combination than Windows 2000/IIS).
Open the le in your browser. You should see the words Hey, it workedin your browser. If you see
Page cannot be displayed,theres a problem with your PHP installation or with nding the le, or with
the Web server. If you see something that talks about a parse error, you may have made a mistake in
entering the code. Coding errors are discussed in more detail in the next few chapters, but in the next
section youll explore some ways you can troubleshoot your basic installation of PHP.
26