You are here: Re: PHP in html « PHP Programming Language « IT news, forums, messages
Re: PHP in html

Posted by Jerry Stuckle on 07/28/07 11:42

Michael Fesser wrote:
> .oO(Jerry Stuckle)
>
>> Matt S wrote:
>>
>>> For Apache of course. You just force the MIME type of .html files to be PHP
>>> files. If you're using an executable directory so to say (+ExecCGI), you
>>> could just put #!/usr/bin/env php at the top and it would be treated as a
>>> PHP file regardless of file extension.
>> And waste a hell of a lot of server resources parsing your static HTML
>> files for PHP.
>
> * using .htaccess you can enable that on a per-directory basis

So? It's still a waste of resources.

> * if you're using PHP for more than just a form on a single page, then
> it doesn't matter, because all pages have to be parsed anyway

Only if they contain php code.

> * the file extension .html (or no extension at all) is preferred for
> stable URIs
>

That's your opinion, anyway.

>> Thank &Diety most shared hosting environments don't allow this. What a
>> bunch of crappola.
>
> Not if done properly.
>
> Micha

If you have any static html pages on your site, you are wasting resources.

It's exactly WHY Apache doesn't by default parse everything with PHP,
PERL, and everything else on the market.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация