PHP without PHP Extension
Posted: Sun Dec 29, 2002 4:00 am
I've regularily embed standard HTML source within my PHP code by inserting it out of the <?PHP ?> tags. But I'd prefer to work in the opposite direction; that being construct my HTML files BUT occasionally embed my PHP code within the HTML file instead (that has the HTML extension). When I do this, however, from an Apache or IIS box, only the HTML is renderred and the PHP code is ignored. It seems the PHP code is only renderred/processed whenever the source file is a .PHP file.
Why do I want to do this? I prefer to author HTML source and distribute to others. Also, it's the HTLM pages I want to be found from popular search engines and not my files with the .PHP extension. Especially since the output they generate is dynamically created.
Some questions....
1. Is what I'm asking for above possible?
2. If not, are there any workarounds to accomplish what I'm attempting to do?
Thanks for your help to this "newbie" question.
Thanks
TechLinks (PHP link driven site)
http://www.techlinks.com
Why do I want to do this? I prefer to author HTML source and distribute to others. Also, it's the HTLM pages I want to be found from popular search engines and not my files with the .PHP extension. Especially since the output they generate is dynamically created.
Some questions....
1. Is what I'm asking for above possible?
2. If not, are there any workarounds to accomplish what I'm attempting to do?
Thanks for your help to this "newbie" question.
Thanks
TechLinks (PHP link driven site)
http://www.techlinks.com