thinkphp5.1 how to prevent cross-domain submit the form, submit the form and forgery

Not repeat specific principles, as follows:

  1. In the validator, add require | token
  2. In view of the token added {: token ()}

 

 

:token()}

{:token()}
{:token()}
{:token()}

 

Guess you like

Origin www.cnblogs.com/xfstu/p/12486974.html