Home > Article > Backend Development > How to use functions such as I(), U(), $this->post() in ThinkPHP, thinkphpthis-_PHP tutorial
The examples in this article describe the usage of functions such as I(), U(), $this->post() in ThinkPHP. Share it with everyone for your reference. The specific method is as follows:
In ThinkPHP, you can use the following method to accept form data in a controller:
1. $_POST[]/$_GET[], but the content of this accepted form will not be filtered through the htmlspecialchars(); function. If you want to use this to receive data, you need to manually process the form data
2. You can use the receiving form function
3. There is a new function I() in thinkphp3.1.3; it directly receives form data and defaults to htmlspecailchars(); it filters this function with these fields I('The name of the form that needs to be received', 'If the data Empty default value', 'Function used to process form data');
U(); The function is the output address
U('operation name', 'array() parameter', 'pseudo-static suffix name', whether to jump, domain name)
I hope this article will be helpful to everyone’s ThinkPHP framework programming.