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 serverthe htdocs subdirectory of your Apache installation, or the /Library/WebServer/Documents directory on Mac OS X. Access this file via your Web browser and you should see something like Figure 4.4, Figure 4.5, or Figure 4.6.

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


Figure 4.5. The results of phpinfo() on a Mac OS X system.


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




Sams Teach Yourself PHP MySQL and Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (4th Edition)
ISBN: 067232976X
EAN: 2147483647
Year: 2003
Pages: 333
Authors: Julie Meloni

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