Home > Articles

  • Print
  • + Share This
This chapter is from the book

Testing Your Installation

The simplest way to test your PHP installation is to create a small test script utilizing the phpinfo() function. This function will produce a long list of configuration information. Open a text editor and type the following line:

<?php phpinfo(); ?>

Save this file as phpinfo.php and place it in the document root of your Web server—the htdocs subdirectory of your Apache installation. Access this file via your Web browser and you should see something like Figure 3.1 or Figure 3.2.

Figure 3.1Figure 3.1 The results of phpinfo() on a Linux/Unix system.

Figure 3.2Figure 3.2 The results of phpinfo() on a Windows system.

  • + Share This
  • 🔖 Save To Your Account