|
#1
|
||||
|
||||
|
Quote:
Code:
AddHandler x-httpd-php .htm .html You can google, "addhandler php", and read the pros and cons on that, but for HostGator, even THAT is not as relevant as this: HostGator's shared/reseller system php.ini allows short-form. The same people who think typing three fewer letters (i.e.: <? instead of <?php) is awesome could likely think that XHTML and HTML are so similar that this XHTML file can just be .html, or because this was HTML which I just changed to XHTML, it can stay that way so the links to it still work. NOW, guess what happens? HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
And in any case, the answer is not to ask the server to check for PHP code in every single .html document. The answer is to change that single .html document to .php, and use a RewriteRule to let the server redirect visitors to the new file. And about those pros and cons of parsing all .html files for PHP. Shared/Resellers have to worry about their CPU load. Programs which write .html files to disk help to reduce CPU load for serving those documents, only because .html is NOT parsed by PHP. |
|
#2
|
||||
|
||||
|
It's not always bad-- I use that on a lot of sites for various reasons.
I think the best takeaway here is that it's not good in *every* situation, not that it should never be use. Certainly, I never understood the huge appeal of the short-form tags. Only 3 letters fewer!
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#3
|
||||
|
||||
|
Quote:
Good observations. I had reconsidered the weight of my tone in OP, but decided to let it be. You're right that it is useful, perhaps, when you need a slight bit of PHP in the midst of some existing HTML documents; but that is most appropriate for those of us who really understand what it's doing, and will remember that we did it (because left a note behind in README, perhaps). Suggesting that Justin Justmakeitwork do that will encourage him to do it on document root, and that is precisely what the previously mentioned HG tech did to mine. |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
All times are GMT -5. The time now is 10:54 PM.









