The PHP template is indeed an easy-to-say and troublesome task. There are more than 20 options for a random number. pear contains 5 different templates, which is really a headache. Never let everyone say that this is a good thing. The PHP template is indeed a matter of ease. There are more than 20 options for a random number. pear contains 5 different templates, which is really a headache.
Never let everyone say that this is a good thing. before you select a template, you 'd better understand what the real goal of the template is? In short, the template's core goal is a team work. There are two important methods:
1. HTML and PHP respectively make it even better for web designers and PHP programmers to cooperate.
2. display the logic and the transaction logic separately, making the change of the core transaction logic and the expansion of the utilization program easier and more mobile. that is to say, the cooperation between programmers is more happy. (This is often neglected or misinterpreted by people. I always think that the logic and the logic of things are displayed separately when PHP is extracted from HTML, how can we mix PHP and html at the beginning ?)
If you understand what the real goal of this template is, you can easily make an accurate choice.
If you have only one php programmer but need to work with other web designers, you can select templates that can be HTML and PHP respectively, phplib (it seems that the http://pear.php.net/package/HTML_Template_PHPLIB is integrated into Pear now) or
FastTemplate is a simple and easy to use.
If your website interface is ugly and it is important for programmers to complete it, but the function is more complex and requires a strong expansion function, the display logic must be included at each layer, so don't use anything special. PHP itself is the best template. Pay attention to the fact that in this case, you need to design your program very seriously and always remember that what you want to do is not PHP or html, but business logic) and presentation logic ). This is why I have always been very resistant to something like Smarty. because the syntax of this Smarty is too complicated and too powerful, it almost re-invented a scripting language, (Even PHP programmers have to learn it again ). What is even more confusing is that the stronger the script, the easier it is to mix the business logic and presentation logic together, damaging the original intention of the template.
If you want to achieve better visual design for HTML and PHP respectively, and want to expand the strength of all systems to adapt to the various interfaces of html, xml, and wml, and there is no need to provide high running efficiency while learning complex syntaxes, so this is a rather provocative title. Bad news is that there is no mature template that can really meet such a request. The good news is that it is not very difficult to complete such a template, if you try Zope or ColdFusion, you will invent the shadow of this template,
(Wact http://wact.sourceforge.net/and phptal http://phptal.sourceforge.net/is developing in this direction and should be promising ).
There are two important methods for template and data combination (Template Call): Push method and pull method.