Building Chinese Web Sites using PHP - Version 2.13, by Dr. Herong Yang
Publishing PHP Scripts as Web Pages
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.
Last update: 2015.
Table of Contents