Php framework-thinkphp beginners, encountering the problem of failure to output variables

Source: Internet
Author: User
Thinkphp is a beginner who follows the official documentation to practice but encounters a problem where variables cannot be output. Controller template output result

Thinkphp is a beginner who follows the official documentation to practice but encounters a problem where variables cannot be output.

Controller

Template

Output result

Reply content:

Thinkphp is a beginner who follows the official documentation to practice but encounters a problem where variables cannot be output.

Controller

Template

Output result

Function call error? Let's take a look at the tutorial.

See what the template tag is.

How is your template hello.html Supposed To Be php?

Check whether execution is performed.helloMethod.
You should read the template directly.
You paste your access URL.

Check whether the configuration file has any settings.TMPL_L_DELIMIn this case, it is generally a matter of delimiters, causing the template engine to not parse variables.

I didn't see any problems.

The default template tag is <$ name>.

You need to take a look at your project configuration file to see your template selection. If it is not set to smarty, the default template is Think, which uses <$ name> for output.

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.