Form Tokens
Thinkphp supports form token validation, which effectively prevents the form from being repeatedly submitted for security protection. To enable the form token feature, you need to configure the behavior binding,
In the behavior definition file tags.php below the configuration directory of the application or module
is in your
Or create a tags.php in your project directory configuration file (conf)
The code inside the tags.php file
return Array ( / / Add the following line definition can //' view_filter ' = = Array (' Behavior\tokenbuild '), // If it is 3.2.1 or later needs to be changed to array(' Behavior\tokenbuildbehavior ');
And then add it to your profile "config.php".
' token_on ' + true, // whether to turn on token validation by default ' token_name ' = ' _ ' _ _hash__ ', // Token-validated form hidden field name, default to __hash__ ' token_type ' = ' MD5 ', / / token hash Validation rule defaults to MD5 ' token_reset ' = = true, // Reset token defaults to true after token validation error
And then it worked.
Details Enter: Http://document.thinkphp.cn/manual_3_2.html#form_token
thinkphp form Tokens