当前位置: 首页> 教育> 锐评 > 全国疫情最新情报_平面网页设计_网络培训系统_seo优化器

全国疫情最新情报_平面网页设计_网络培训系统_seo优化器

时间:2025/8/23 21:38:31来源:https://blog.csdn.net/2301_80189168/article/details/143558878 浏览次数:0次
全国疫情最新情报_平面网页设计_网络培训系统_seo优化器

csrf

get请求

路由

//  index.php
Route::get('/', function () {// return view('welcome');return view('login');
});Route::get('d3',function(Request $request){echo "输入的内容是" . "<font color=''>".$request -> input('mytext')."</font>";
});

视图
在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head>
<body><form action="http://localhost/index.php/d3" method="get">内容:<input type="text" name="mytext"><br><input type="submit" value="提交" ></form>
</body>
</html>

post

在这里插入图片描述

在 form 表单 中 开启 令牌
路由

//  index.php
Route::get('/', function () {// return view('welcome');return view('login');
});Route::post('d3',function(Request $request){echo "输入的内容是" . "<font color='red'>".$request -> input('mytext')."</font>";
});
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head>
<body><form action="http://localhost/index.php/d3" method="post">@csrf<!-- 上面这行就是开启令牌 -->内容:<input type="text" name="mytext"><br><input type="submit" value="提交" ></form>
</body>
</html>

在这里插入图片描述

关键字:全国疫情最新情报_平面网页设计_网络培训系统_seo优化器

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: