The use of the u method in tp and the tpu method. The use of the u method in tp, tpu method has never used this method when using self-taught, and now I just entered a new company to participate in the project. We found that this method is used a lot, so we recorded the use of the u method in tp, and the use of the tpu method.
I have never used this method during my self-study. now I am entering a new company to participate in the project. This method is often used, so it should be recorded to prevent future forgetting.
The U method is used to assemble the URL address. the feature is that the corresponding URL address can be automatically generated based on the current URL mode and settings. the format is:
U ('address', 'parameters', 'pseudo-static ', 'redirect?', 'display domain name ');
1 // for example, the operation is successfully redirected to the lists method 2 $ this-> success ('newly added success', U ('strore/Ump/lists') in the Ump controller of the Store module '));
1 // 2 $ this-> success ('added successfully', U ('store/Ump/lists ', 'type = 1 & id = 1 '));
When using the U method in a template, the advantage is that once your environment changes or the parameter settings change, you do not need to change any code in the template.
The call format in the template must use {: U ('address', 'parameters '...)} Method
{: U ('store/Ump/lists', 'type = 1 & id = 1 ')}
I did not use this method when I was a self-taught employee. now I am entering a new company to participate in the project. I found that this method is used a lot, so I recorded it...