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

Posted by Jerry Stuckle on 07/30/07 19:46

Michael Fesser wrote:
> .oO(Jerry Stuckle)
>
>> Michael Fesser wrote:
>>> .oO(Jerry Stuckle)
>>>
>>>> Michael Fesser wrote:
>>>>> * using .htaccess you can enable that on a per-directory basis
>>>> So? It's still a waste of resources.
>>> Like storing images in a database for example. Who's wasting resources
>>> then?
>> Not at all. Databases are quite efficient at retrieving data -
>> including images.
>
> You missed my point here. Consider a script-generated page with 20
> statically linked images and a static HTML page with 20 images retrieved
> from a database. To be viewed in a browser the first page requires just
> a single script call, while the second requires 20(!) script calls in
> order to fetch all images from the DB.
>

First of all, if it's script-generated, it's not static, is it?

Of course, you conveniently ignore the fact those 20 images require 20
additional calls to the server, anyway. The script will already be in
memory (if nothing else, the OS cache will have it), and the overhead of
interpreting it isn't very bad at all. And it beats trying to keep
track of thousands (or tens of thousands) of files on the disk.

>>> As said, "if you're using PHP for more than just a form on a single
>>> page", then it's very likely that all pages contain PHP code, even if
>>> it's just an include of a menu bar script.
>> Nope. Not at all. I have several sites with some pages which have no
>> PHP in them at all. And if they have a menu bar script, they're
>> included with SSI.
>
> But using SSI on all pages also wastes resources compared to plain
> static files ...
>

Not nearly as much as PHP. But I didn't say I used SSI on all pages,
either, did I?

>>>>> * the file extension .html (or no extension at all) is preferred for
>>>>> stable URIs
>>>> That's your opinion, anyway.
>>> Not only mine. It's also the W3C's opinion.
>> Exactly where do they say that?
>
> Cool URIs don't change
> http://www.w3.org/Provider/Style/URI
>
> | What to leave out
> | [...]
> | * File name extension.
> | * Software mechanisms.
>
> Micha

They say URI's don't change. They don't say to interpret every page as PHP.

--
==================
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

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