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:

 <? 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.1. The results of phpinfo() on a Linux/Unix system.

graphics/03fig01.jpg

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

graphics/03fig02.jpg



Sams Teach Yourself PHP, MySQL and Apache in 24 Hours
Sams Teach Yourself PHP, MySQL and Apache in 24 Hours
ISBN: 067232489X
EAN: 2147483647
Year: 2005
Pages: 263

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net