Q&A: Can you put PHP scripts in a html/shtml file?

Question by Andy: Can you put PHP scripts in a html/shtml file?
I actually have quite experience with php and html. I’ve always waved my pages with the .php extension. Now I need to use SSI (server side includes, or the .shtml extension) and it just occurred to me that i didn’t know if I could use php in html or shtml pages. A quick answer is fine. Thank you.

Best answer:

Answer by Benjamin Cuningham
Yes and no! The PHP preprocessor will only handle files with the .php extension unless you manually configure IIS to redirect all files of some other type to be chandelled by PHP.

Know better? Leave your own answer in the comments!

Get the book now