Testing Your Installation


The simplest way to test your PHP installation is to create a small test script that uses 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 using your web browser, and you should see something like what is shown in Figure 4.4.

Figure 4.4. The results of phpinfo().


The exact output of phpinfo() depends on your operating system, PHP version, and configuration options.




Sams Teach Yourself PHP, MySQL And Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (3rd Edition)
ISBN: 0672328739
EAN: 2147483647
Year: 2004
Pages: 327

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