In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "thinkphp non-resolution u solution", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn the "thinkphp non-resolution u solution" this article.
Thinkphp does not parse u because the template engine only parses it once, and the usage of tags that are not in the template file will not be parsed. The solution is to generate it once before putting it in the database, and then save it.
This article operating environment: Windows7 system, thinkphp v5.1, Dell G3 computer.
The U method of Thinkphp can not correctly analyze the problem.
When I use the U method of ThinkPHP, for example, I put {: U (GROUP_NAME. '/ Clear/clearCache')}, stored in the database as a string, and then I read it out from the database and assigned it to the foreground → to clean the cache. As a result, the foreground shows cleaning the cache and does not parse the URL generated by the U method. What is the reason for this?
Problem analysis:
The template engine will only parse once, and the variables you use will only be replaced with values, not finished, and then go to the values to see if there are any tags to be parsed. Therefore, what you store in the database should be data that does not contain TP tags.
Do not put this statement in the database
Solution: 1. Generate it once before putting it in the database, and then deposit it in, 2. Generate when using, recommend the first kind.
The above is all the content of this article "thinkphp does not parse u solution". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.