PHP code example of ajiho / think-csrf
1. Go to this page and download the library: Download ajiho/think-csrf library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ajiho / think-csrf example snippets
return [
//cookie中的key(可自行更换)
'cookie_key' => '0cc175b9c0f1b6a831c399e269772661',
//传递的csrf参数名称
'param_key' => '_token',
];
\ajiho\middleware\VerifyCsrfToken::class