Forum Moderators: phranque
My server is setup to parse php in htm/html.
Also, if you're not using the php extension, why use .htm or .html? Isn't one for unix, one for windows servers? Both work on my unix server.
Thank you
HTML and PHP are platform independent. You can even run asp on unix if you absolutely must, bad idea, but you can do it.
Using PHP I don't like, it looks odd to me, the user doesn't need to know they are on a scripted page in most cases, I like to keep everything very normal. Other people are fans of using nothing, like /folder/file but it really doesn't matter in the end.
The one thing you should never use is shtml, that one makes me wince, that's such a weak scripting language you're probably going to end up running a real scripting language at some point on the pages anyway.
My server is setup to parse php in htm/html.Also, if you're not using the php extension, why use .htm or .html? Isn't one for unix, one for windows servers?
As for the difference between .htm and .html, there are none. The only reason we have two extensions for the same MIME type is because of the old DOS naming convention of 8.3. Because DOS file extensions could be no more then 3 characters, the 'l' was dropped to fit. But since we no longer have to deal with the limitations of the DOS naming convention any more, then ideally you should use the full extension.
The one thing you should never use is shtml, that one makes me wince
The biggest disadvantage I found with SSI has to do with server support. As far as I know, only NCSA derived servers, such as Apache, support SSI. IIS, on the other hand, just ignores it. This, of course isn't a problem so long as you stick with Apache. But if you find yourself switching form an Apache server to an IIS server, then you will have to completely rework your website using a scripting language supported by the server, such as PHP.
Are there any disadvantages of having no extension?
In the end, it shouldn't mater what the extensions are, so long as the correct MIME type is sent by the server and recognized by the browser.
On that basis should I make my html pages .php or .html? (note, I'm using/integrating php includes and some php scripts - but I'm not a php scripter)
My server is configured to pass php within html. It's not a high load site. Isn't that a negligible performance hit on the server?
Finally (don't worry about this one as I can research), how does the lack of MIME identity for files with no extension cause a problem?
Thank you