|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ThermoDust Smarty Regular
Joined: 10 Sep 2003 Posts: 38
|
Posted: Thu Nov 06, 2003 6:59 am Post subject: What do the compiled templates do? |
|
|
What do the compiled templates do? Like, are the important or what? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Nov 06, 2003 7:46 am Post subject: |
|
|
Hi ThermoDust.
Most template systems operate at runtime--when a template is requested, it is read at the time of the request and the required replacements are searched for, calculated and performed. All consequent requests for the template generate the same overhead.
In contrast, Smarty treats the template as a source file written using Smarty's syntax. When a template is requested, Smarty reads the template and creates a new PHP script--the compiled template--which directly performs all of the replacements (and actions) required by the source template file. The newly created compiled php script is then used to satisfy the template request--Smarty simply includes (runs) it. The small compilation overhead is overshadowed by the fact that all future requests for the template are directly served by the already compiled PHP script. By default, Smarty detects template changes, automatically recompiling the associated PHP script for you.
IMHO, the compiled templates are a very big part of the 'smarts' of Smarty--one of its defining features and a corner stone of its operation |
|
Back to top |
|
ThermoDust Smarty Regular
Joined: 10 Sep 2003 Posts: 38
|
Posted: Thu Nov 06, 2003 8:38 am Post subject: |
|
|
In the complied templates, what if like a member section is there. Can people access these compiled templates? |
|
Back to top |
|
mystrymaster Smarty Rookie
Joined: 31 Oct 2003 Posts: 17
|
Posted: Thu Nov 06, 2003 12:16 pm Post subject: |
|
|
I would imagine they would be able to acceess these but have you seen the structure?
The folder nameing convention is like %%321hg3bknkmllgfd897
or somethign like that
I would give someone credit if they can figure that out for a specific page |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|