Smarty variable regulator failure solution, smarty variable Regulator

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.