Home > Article > Backend Development > Solution to the failure of Smarty variable regulator, smarty variable regulator_PHP tutorial
Smarty’s variable regulator is a good thing. It has always been easy to use. However, when I used the variable regulator yesterday, I found that it didn’t work.
The result is great. It turns out that the variable must be directly followed by a vertical bar, the function name, and there must be no spaces in the middle, otherwise the function of the variable regulator will be invalid. After a long time of fussing, it turned out that it was caused by a space. It was so unworthy! ! !
It seems that when adjusting the smarty program in the future, you have to pay attention to the space problem. Maybe other problems may also be caused by spaces, and problems caused by spaces are the hardest to find.
There is no difference between the two types
It's very simple, just look at the Smarty template manual and you will know!