Publishing PHP Scripts as Web Pages
<< Integrating PHP with Apache Web Server
<< Building Chinese Web Sites using PHP
This section describes how to publish PHP scripts as Web pages on the Apache server.
The verify my Apache and PHP integration, here what I did to publish a PHP script as a Web page on the Apache server:
1. I wrote this simple PHP script, hello.php, with a text editor:
<html> <body> <?php echo "Hello world!"; ?> - PHP script. </body> </html>
2. Copied this script file to Apache document directory, \local\apache\htdocs:
C:\> copy hello.php \local\apache\htdocs
3. View it with a Web browser at http://localhost/hello.php. The Web page resulted from the PHP script shows up correctly:
Hello world! - PHP script.
Sections in This Chapter
Downloading Apache 2.2.4 Binary for Windows
Installing Apache 2.2.4 on Windows Systems
Publishing HTML Documents as Web Pages
Configuring Apache for PHP CGI Scripts