Use of the U method in TP, TPU method using _php Tutorial

Source: Internet
Author: User

Use of the U method in TP, using TPU method


I didn't use the method when I was learning, and now I've just entered a new company to participate in the project. Found this method with a lot of, so record down to prevent later forget.

The U method is used to complete the assembly of URL addresses, which is characterized by the ability to automatically generate corresponding URL addresses based on the current URL pattern and settings, in the following format:

U (' address ', ' parameters ', ' pseudo-static ', ' whether Jump ', ' Show domain name ');

1 // For example, the operation successfully jumps to the lists method in the UMP controller under the store module 2 $this->success (' New Success ', U (' strore/ump/lists '));
1// with parameters when jumping. 2 $this->success (' New Success ', U (' store/ump/lists ', ' type=1&id=1 '));

When you use the U method in a template, the advantage is that you do not need to change any of the code in the template once your environment changes or the parameter settings change.

The call format in the template needs to take the form {: U (' address ', ' Parameters ' ...)}

  
   {: U (' store/ump/lists ', ' type=1&id= 1 ')}

http://www.bkjia.com/PHPjc/941172.html www.bkjia.com true http://www.bkjia.com/PHPjc/941172.html techarticle The use of the U method in TP, the TPU method using self-study when not how to use the method, and now just enter a new company to participate in the project. Found this method with a lot of, so record down ...

  • 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.