This article mainly introduces the solution to the failure of the Smarty variable regulator. It can be said that the record filing is triggered by a space, and I am depressed for half an hour. I would like to share it with you. For more information, see
This article mainly introduces the solution to the failure of the Smarty variable regulator. It can be said that the record filing is triggered by a space, and I am depressed for half an hour. I would like to share it with you. For more information, see
The variable regulator of Smarty is a good thing, and it has always been easy to use. It can be found that it doesn't work when I used the variable regulator yesterday.
The 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.
The 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.