1. Introduction to MVC
The core business logic of the system runs inside the model;
Formatted output of the view processing system;
The controller handles input and communicates with the controller
2. Commonly used template systems
Smarty FastTemplateSmart
....
3. Smarty Overview
Advantages and development features....
4. Smarty installation and configuration
5. Basics of Smrty development
Variables and variable formatting:
Variable source:
Capitalize the first letter: { $title| capitalize}?>
Count the number of characters: { $title| count_words}?>
Date processing: { $filed| "$B %e, %y"}?> M:%S"}
Filter characters: { $title| strip_tags}?>
may be intercepted: { $title|trancate:20:"..." | false }?>
nl2br modifier: { $text | nl2br}?>
6. Control structure
Branch: if elseif else /if
Comparison operators: eq (= ), neq(!=) ,gte(>=) ,not (<=)
Loop structure:
foreach
section
7. Cache
8. In-depth development
register_function
register_block
register_modifier
{php}?>{/php}?>
Important modifiers:
default
strip_tags
literal
nl2br
truncate
Generate static page: www.2cto.com
$output = $smarty->fetch('tmp.html');
fwrite($fp,$output);
http://www.bkjia.com/PHPjc/477664.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477664.htmlTechArticle1. The MVC introduction model runs the core business logic of the system; the view handles the formatted output of the system; control The processor processes input and communicates with the controller 2. Commonly used template systems...