O'Reilly logo

PHP for Teens by Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

htm or .html Extension

By default, most of the pure HTML documents have the extension .htm or .html. However, this is not always the case. Some have .php, .xml, .shtml, .cgi, or others. The web server (in our case, Apache, which you installed in Chapter 1) chooses what actions to take based upon the file extension. Remember when you added the following lines to the httpd.conf file during installation of PHP?

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

The first line (LoadModule) tells Apache to load the instructions to deal with any .php file, and the second line tells Apache to use PHP to handle any files with the .php extension. Figure 2.1 shows what ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required