[FX.php List] A question about PHP in pages

jason f. boldt jason_fb at beezwax.net
Wed Dec 20 01:26:17 MST 2006


Bob,
Here's a snippet from a standard Apache configuration file:

<IfModule mod_php4.c>
     # If php is turned on, we repsect .php and .phps files.
     AddType application/x-httpd-php .php
     AddType application/x-httpd-php-source .phps

     # Since most users will want index.php to work we
     # also automatically enable index.php
     <IfModule mod_dir.c>
         DirectoryIndex index.html index.php
     </IfModule>
</IfModule>


This tells the Apache server to map the extension ".php" to the MIME- 
type that handles PHP scripts (in this case, the compiled PHP  
executable, shown here as the MIME-type "application/x-httpd-php").

For more information, see http://httpd.apache.org/docs/1.3/mod/ 
mod_mime.html#addtype




On Dec 19, 2006, at 4:17 PM, Bob Patin wrote:

> Is it mandatory to name a page containing PHP with the ".php"  
> extension?
>
> One of my friends told me that she has some pages with the ".htm"  
> extension, and because of the way her web server is configured,  
> these pages process their embedded PHP without trouble.
>
> I thought the PHP extension was mandatory, or did they change their  
> web server so that .htm pages are considered to be PHP pages also?
>
> Thanks,
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
>
>   CONTACT US VIA INSTANT MESSAGING:
>      AIM or iChat: longterm1954
>      Yahoo: longterm_solutions
>      MSN: tech at longtermsolutions.com
>      ICQ: 159333060
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>



More information about the FX.php_List mailing list