The examples in this article describe the use of functions such as I (), U (), $this->post () in thinkphp. Share to everyone for your reference. The specific methods are as follows:
The following methods can be used to accept data from a form in a thinkphp in a controller:
1, $_post[]/$_get[], but this accepted form content is not filtered through the Htmlspecialchars () function. If you want to use this receive data, you need to process the form data manually
2, can be used to receive form functions
Copy Code code as follows:
$this->_post (); $this->_get ();
, this function is filtered by default using Htmlspecialchars () without manual filtering.
3, in the thinkphp3.1.3 has a new function I (); Receive form data directly and default to Htmlspecailchars (); Filter this function to have these fields I (' Required table single-name ', ' If the data is null default ', ' use the function to process the form data ') ;
U (); function is output address
U (' Operation name ', ' array () parameter ', ' pseudo static suffix name ', whether jump, domain name)
More interested in thinkphp related content readers can view the site topics: "thinkphp Introductory Course", "thinkphp Template Operation Skills Summary", "thinkphp Common Methods Summary", "Smarty Template Introductory Course" and "PHP template technology Summary."
I hope this article will help you with the PHP program design based on thinkphp framework.