In ThinkPHP, you can use 1, $ _ POST [] $ _ GET [] to accept the form data in the controller. However, the accepted form content is not filtered by the htmlspecialchars (); function. To use this method to receive data, you must manually process the form data.
In ThinkPHP, the data that accepts forms in the controller can be used
1. $ _ POST []/$ _ GET [], but the content of the accepted form is not filtered by the htmlspecialchars (); function. To use this method to receive data, you must manually process the form data.
2. you can use the receive Form Function $ this-> _ post (); $ this-> _ get (); function. by default, this function uses htmlspecialchars () for filtering, no manual filtering is required.
3. there is a new function I () in thinkphp3.1.3. the Function directly receives form data and defaults to htmlspecailchars (); filter this function with these fields I ('form name to be received ', 'If data is empty default value', 'Use function to process form data ');
U (); function is the output address
U ('Operation name', 'Array () parameter', 'pseudo-static suffix name', jump or not, domain name)