The command to add to .htaccess to get html files treated as php is:
AddHandler server-parsed .html
felgall
Junior Poster in Training
50 posts since Aug 2004
Reputation Points: 13
Solved Threads: 1
you can't run php code inside a .html files.... your files should be saved as .php so it will be parsed at the server.
Actually you can - but it means using htaccess files (as mentioned previously) or using a templating engine (e.g. Rain TPL) which stores cached php files of htmls. For everyday use, I really can't see what advantage there is to be gained from using the *.htm(l) extension if you're using server-side code.
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
hey ardav! you always contradict at my every post! grrr....! :@
Well, ardav is correct so he is completely within his right to make a post :)
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
hey ardav! you always contradict at my every post! grrr....! :@
Sorry VD, wasn't intentional - no vendetta, honest! Cheers Shawn.
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
In any case, we have found a work-around for this problem so I no longer need to modify the IIS server data. Thanks anyway
Mark it solved then.
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
Fair one. A lesson to a few of us (me especially) to read the posts properly.
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080