> I mean, for example say you have
> an html that consists of blocks... Making every block
> an include is clean, but this time, php engine has to
> read all of these includes, and parse the html+php and
> compile/run php everytime a request is made??? I am
> not sure about this?

I wouldn't say it was clean to split everything out into separate files.
I tend to do something more like:

  <? include 'logic.php' ?>
  <HTML> tags tags tags
    <? my_func() ?>
  More tags
    <? another_func() ?>
  More tags
  <? footer() ?>

ie. don't necessarily use 1 file per block, create functions that are
defined in a single file and call those instead of including a new file.
If you really do want to separate it, have a look at a cacheing templating
system like Smarty which lets you keep this per-file separation but it
caches the combined logic.

  http://www.phpinsider.com/php/code/Smarty/

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to