Forum Moderators: coopster

Message Too Old, No Replies

PHP, server side includes, and changing file extensions

         

Farser

3:32 pm on Jul 3, 2008 (gmt 0)

10+ Year Member



On my homepage I have a feed of the five most recent topics in my forum in the form of server side includes, thus my index file was a .shtml extension. Recently I added a php script that showed the latest events in the calendar so i had to rename my index .php...this means that the forum recent topic part has stopped displaying.

Any ideas how I get around this, I am sure it is ridiculously simple to some of you.

Do I need to parse the .shtml as PHP?

thanks

farser

eelixduppy

3:41 pm on Jul 3, 2008 (gmt 0)



You can parse the .shtml file as PHP or you can include the files with PHP instead of SSI. Are you running apache?

Farser

4:09 pm on Jul 3, 2008 (gmt 0)

10+ Year Member



I am with Apache. Which of those would be the easiest option for me to accomplish?

eelixduppy

4:13 pm on Jul 3, 2008 (gmt 0)



They are both pretty easy. If you can include the SSI stuff with regular PHP includes [php.net] then that would be the best solution IMO. The other method would allow ALL .shtml files to be parsed as PHP, which is something you probably don't want to do.

Farser

4:19 pm on Jul 3, 2008 (gmt 0)

10+ Year Member



Ok,
Thanks you very much for your speedy response!
I will give that a go!