1. How to configure our smarty
After unzipping, place the libs folder in the first-level directory of the website, and then create two folders
templates stores template files
templates_c stores compiled files
Create the initialization file smarty.ini.php again

Note:
1. Generally use <{}>
as the identifier separator for replacement variables. Two ways to change the delimiter:
1. Change the source code: Smarty.class.php $left_delimiter Not recommended
2. Dynamic modification:
$Smarty->left_delimiter="<{";
$Smarty->right_delimiter="}>";
written before display

2.smarty allocates data
$smarty->assign("Address",$address);
Used to assign values ??to templates. You can specify a name/number pair or an associative array containing name/numbers.
$smarty->assign("aa",true); //Output 1
$smarty->assign("aa",false); //Output is empty

Statement of this Website
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn

Related recommendations

PHP Smarty Chinese Manual

PHP Smarty Chinese Manual
php e-book
2018-02-23

php smarty template tutorial

php smarty template tutorial
php e-book
2018-02-22

"php Smarty Template Chinese Manual"

"php Smarty Template Chinese Manual"
php e-book
2017-12-16

Getting started with Smarty for beginners learning PHP

PHP designers who are new to template engines will find it difficult when they hear Smarty. In fact, the author is no exception and dare not touch it. But later when I analyzed the program architecture of XOOPS, I began to find that Smarty is actually not difficult. As long as you master the basic skills of Smarty, it is quite sufficient for general applications. Of course, if you can lay the foundation well, you don’t have to worry about the advanced applications later. The main purpose of this article is not to delve into the use of Smarty, which has been fully written in the official instructions for use. Pen
php e-book
2017-12-08

php smarty template tutorial (English PDF version)

php smarty template tutorial (English PDF version)
php e-book
2018-02-10

Getting started with PHP template engine smarty Chinese WORD version

Getting started with PHP template engine smarty Chinese WORD version
php e-book
2017-09-29

PHP template Smarty installation and use introductory tutorial Chinese WORD version

PHP template Smarty installation and use introductory tutorial Chinese WORD version
php e-book
2017-09-29

Handmade baked food website template

Handmade baked food website template website template is a website template that provides various handmade baked food promotion website templates for download. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2023-10-30

Popular Recommendations

TP5 actual combat_teaching management system whole site source code

This set of tutorials uses a real school teaching management system as an example to teach you step by step how to quickly develop a commercial project using the ThinkPHP5 framework on a piece of white paper, starting from scratch, allowing you to quickly get started with TP5 project development. .

PHP common function summary table

Commonly used functions in PHP, functions that are often used during development

PHP practical Tianlongbabu imitation iQiyi movie website courseware

PHP practical Tianlongbabu imitation iQiyi movie website courseware

TP5 enterprise website development source code

This site's "ThinkPHP5 Enterprise Site Rapid Development Course" package

Thinkphp6.0 official version video tutorial

Thinkphp6.0 official version video tutorial

thinkphp3.2.3 blog template

thinkphp3.2.3 blog template

Courseware related to practical development of general backend management system (Thinkphp6+Layui)

Courseware related to practical development of general backend management system (Thinkphp6+Layui)

ThinkPHP5 mall project practical video tutorial courseware source code

ThinkPHP5 mall project practical video tutorial courseware source code

Day 49~58 teaching source code

Day 49~58 teaching source code

Live class_Blog project source code

Live class_Blog project source code