Kirk,
You have to tell your "tinyweb" what to do with the .php extensions... in
the config of the webserver, you will have to add a line saying where the
php binary is, or uncomment it (as it probably already exists) and restart
the webserver.
As it appears to me, since you can have some "code" on the screen, your
server does not know how to deal with it, so it will treat it like a text
file, and just spew the code out. Once you have it pointing to the php
binary, it will work.
Good luck!
Steve Staples.