ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

4
Date Submitted Thu. Aug. 28th, 2008 9:33 AM
Revision 1
Scripter Fordiman
Tags buffering | errors | Output | PHP | template
Comments 0 comments
Best use of ob_, custom error handling, and variable variales evar: simple templating.

_parse($filename[,$locals])
includes $filename and renders its output to the return value. $locals, if used, will add a set of variables to the included context.

Parse($template[,$locals])
Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.

t($template[,$obj])
...
t()
Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.

Play around with t(..) to find out more; I don't feel like documenting it.