karthy
karthy

Reputation:

html to php change

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

Upvotes: 1

Views: 181

Answers (2)

Rob
Rob

Reputation: 48369

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.

Upvotes: 10

Matthew Iselin
Matthew Iselin

Reputation: 10660

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).

Upvotes: 5

Related Questions