Smarty variable regulator failure solution, smarty variable Regulator
Smarty's variable regulator is a good thing, and it has always been easy to use. However, it was discovered that it did not work when I used the variable regulator yesterday.
Copy codeThe Code is as follows:
{$ Name | upper}
I carefully read the manual, read the smarty loading path, and checked it up and down for nearly an hour without finding the problem. The code will be deleted and re-written into a helpless dilemma.
Copy codeThe Code is as follows: {$ name | upper}
The result is good. It turns out that the variable must be directly followed by a vertical line, function name, and no space in the middle. Otherwise, the function of the variable regulator will become invalid. After a long time, it turned out to be caused by a space. It's not worth it !!!
It seems that the smarty program will be called later. Pay attention to the space issue ~, Other problems may also be caused by spaces, which are the least likely to be discovered.
Question about variables defined by smarty
There is no difference between the two
Php + smarty development and my younger brother are new to you. QQ 544630057 is in urgent need of help from you.
It's easy. You can see the Smary template manual!