pick up an article
10.Html_options Print a set of option for select elements
{html_options values= $cust _ids selected= $customer _id output= $cust _names}
Text
Values: An array of value
Output: An array of text
Selected: The value of the selected item
11.Html_radios Print a group of radio buttons
Grammar:
{Html_radios values= $cust _ids checked= $customer _id output= $cust _names separator= "
"}
Values: An array of value
Output: An array of text
Separator: Delimiter
Checked: The value in the selected option
Iii. Configuration Files
The configuration file facilitates the designer to manage the template global variables in the file. The simplest example is the template color variable. In general, if you want to change the appearance of a program, you have to change the color of each file. If you have this configuration file, the color variables can be saved in one place, as long as the change of this configuration file can be used to achieve your color updates.
Configuration file:
In the above problem, the bgcolor in CONFIG1 and the global bgcolor have the same name, with the local bgcolor as the standard
There is no fgcolor variable in CONFIG1, so the value of the Fgcolor variable in the global is executed
Programming
One, constant
Smarty_dir
Second, the variable
L $template _dir: template path
L $compile _dir: Compile Path
L $config _dir: Configuration file path
L $cache _dir: Cache file path
L $left _delimiter: Left delimiter
L $right _delimiter: Right delimiter
L $caching: Whether to turn on caching
Public $caching = false;
The default is open and closed cache, can be set directly to true, turn on the cache function
L $cache _lifetime: Valid time of cache (life cycle)
Public $cache _lifetime = 3600;
The default is 3,600 seconds,
L $debugging Open the debug window
There are two ways to open the Debug window:
1) in the template, use the {debug}
2) in the program, use $smarty->debugging=true
Open in program: You can see the variables assigned to the template
Open in Template: variable assigned to template, template custom variable
L $php _handling: In smarty2.6, if you want to use the {PHP} tag, you must set the value of this option to True
The above describes the Php-smarty-6 (23), including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.