Log in

View Full Version : PHP on HTML page



ashras99
09-12-2006, 01:53 PM
I want to add a php on a html page so i write a below line in the .htaccess

AddHandler application/x-httpd-php .php .html


And this works absolutely fine...but my webhosting service saying now all the pages pass through php and that's why increasing the server load...

Please tell me is that possible that i create a line just for few pages on which php is added. Those pages are stored in the root...

Please tell me what line to use....

ItsMeOnly
09-12-2006, 03:14 PM
remove .html, and use .php extension

ashras99
09-12-2006, 03:18 PM
if i remove .html then how php works on html page. :confused:

ItsMeOnly
09-12-2006, 04:48 PM
just the same way, just instead of .html, the file will have .php extension- plain and simple

ashras99
09-12-2006, 05:16 PM
my friend my site have html pages with .html extension and links are set which cant be changed so .html cant be changed to php file extension

any more suggestion.

shachi
09-12-2006, 05:18 PM
ashras99: may be you are not aware but php files *can* have html tags and it will parse them correctly. And if you want to put in php then you use the <?php and ?> tags.