tags:

views:

73

answers:

2
+1  Q: 

html to php change

if i change the extension of html file as .php means it will make any changes..?

+5  A: 

No. It will just mean the page goes through the PHP interpreter rather than being directly served (assuming the PHP interpreter actually exists and is configured properly with your server).

Matthew Iselin
+10  A: 

The effect of changing a .html extension to .php depends on the web server configuration; if the server is configured with PHP installed and associated with .php files, then the PHP preprocessor will be run against the file before the HTML is printed. In the case of a standard HTML file with no extras, this will make no obvious difference, although client-side caching may behave differently, and any incoming links will of course be broken. There's also a slight performance penalty.

If PHP isn't installed, or hasn't been configured to handle .php files (some PHP 5 configurations are set for .php5) then the web server will usually spit out the raw text of the file, which may or may not be treated as HTML by the browser.

Rob
and you'll have a little performance penalty
klez
@klez: Cheers for the reminder - noted in the answer.
Rob