Re: general organization question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Oct 2004 13:19:37 -0700, lists <lists@xxxxxxxxxxxxxxxx> wrote:
> I"m wondering what factors are at play in deciding to use "require",
> "include",

This dictates the level of error reporting you desire when pulling in
a file.  On failure, include() won't stop your script execution, while
require() will.  The overhead is probably not all that different. 
Feel free to benchmark them both and see for yourself.

> "file_get_contents" and such when laying out a site.  Like

As we discussed here the other day, you risk backwards compatibility
when using the newer PHP functions with older PHP installs.  If your
server supports it then go for it.  People who write scripts and sell
them (like me) can't count on such things and must play it safe and
use the older PHP functions.  Or like in my stuff here at work the
other day I found our strict "Debian stable - no deviation" policy
prevented me from using file_get_contents().  It didn't ruin my day or
anything.  :)

> why use one template, or many - why use different pages rather than
> relying on variables.

I scoff at template engines like Smarty and frameworks like Mojavi. 
But that's just me.  I work with both of those technologies everyday
but would never include them in my own projects.  For good templating
all you _really_ need is eval() to parse out your variables. 
Everything else is overhead.

> I'm also wondering about how I see "{content}"
> type stuff in phpBB and Coppermine Photo Gallery.  Does it have to deal
> with customization?

Some of those guys wrap their variables in curly braces for whatever
reason.  It's definitely not required by eval().

> Anyone have any recommendations where I can learn more about this, I
> guess structural, stuff?

The php.net manual has great code samples throughout.  There are many
good php related sites out there too.  phpbuilder.com is a good one.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux