Who can post the code of this function, and how it works
Reply to discussion (solution)
You can use the IDE to find out.
smarty_internal_data.php
/** * Assigns a Smarty variable * * @param array|string $tpl _var the template variable name (s) * @param mi Xed $value the value to assign * @param boolean $nocache If true all output of this variable would be is not Cached * @param boolean $scope The scope the variable would have (local,parent or root) */Public function IGN ($tpl _var, $value = null, $nocache = False) {if (Is_array ($tpl _var)) {foreach ($tpl _var as $_key = = $_val) {if ($_key! = ") {if (Isset ($this->tpl_vars[$_key])) { $this->tpl_vars[$_key]->value = $_val; $this->tpl_vars[$_key]->nocache = $nocache; } else {$this->tpl_vars[$_key] = new Smarty_variable ($_val, $nocache); }}}} or else {if ($tpl _var! = ") {if (Isset ($this->tpl_va rs[$Tpl_var]) {$this->tpl_vars[$tpl _var]->value = $value; $this->tpl_vars[$tpl _var]->nocache = $nocache; } else {$this->tpl_vars[$tpl _var] = new Smarty_variable ($value, $nocache); } } } }
The above is the Smarty in assign () This function is how to define the content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!