Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of I (), U () and $this->post () functions in ThinkPHP

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains the usage of I (), U () and $this- > post () functions in ThinkPHP, which you may wish to have a look at. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn the usage of the I (), U () and $this- > post () functions in ThinkPHP.

This paper illustrates the usage of functions such as I (), U (), $this- > post () in ThinkPHP. Share it with you for your reference. The specific methods are as follows:

To accept the form's data in the controller in ThinkPHP, you can use the following methods:

1. $_ POST [] / $_ GET [], but the accepted form content is not filtered by the htmlspecialchars (); function. If you want to use this to receive data, you need to process the form data manually

2. You can use the receive form function

The copy code is as follows:

$this- > _ post (); $this- > _ get ()

This function uses htmlspecialchars () for filtering by default instead of manual filtering.

3. There is a new function I () in thinkphp3.1.3; receives form data directly and defaults to htmlspecailchars (); filter this function has these fields I ('form name to be received','if data is empty default', 'function used to process form data')

U (); function is the output address

U ('operation name', 'array () parameter', 'pseudo-static suffix name', whether to jump, domain name)

At this point, I believe you have a deeper understanding of the use of "I (), U (), and $this- > post () functions in ThinkPHP". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report