The examples in this paper describe the use of functions such as I (), U (), $this->post () in thinkphp. Share to everyone for your reference. Here's how:
In thinkphp, you can use the following methods to accept the form's data in the controller:
1, $_post[]/$_get[], but this accepted form content will not be filtered by htmlspecialchars (); 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 to copy code code as follows: $this->_post (), $this->_get (), this function will be filtered by default using Htmlspecialchars (), without manual filtering.
3, there is a new function I () in the thinkphp3.1.3, directly receive the form data, and the default is Htmlspecailchars (); Filter This function has these fields I (' need to receive table sole name ', ' if the data is null default value ', ' use the function to process the form data ') ;
U (); function is output address
U (' Operation name ', ' array () parameter ', ' pseudo static suffix name ', jump, domain name)
It is hoped that this article will be helpful to everyone's thinkphp framework design.