网页向后端传送数据的时候有两种方式,get和post。通过设置form中的method来达到是否采用get或者是post 这个错误的意思是csrf校验失败,request请求被丢弃掉。我们先来了解下什么是csrf。 CSRF, Cross Site Request Forgery, 跨站点伪造请求。 ...
分类:
其他好文 时间:
2017-11-05 15:32:52
阅读次数:
218
路由 控制器(Http\Controllers\Admin\LoginController.php) 模板(reeources\views\login\login.blade.php) ...
分类:
其他好文 时间:
2017-11-05 15:05:58
阅读次数:
177
请求周期: url > 路由 > 函数或类 > 返回字符串或模板语言 Form 表单提交: 先处理模板语言再讲HTML发出去 提交 > url > 函数或类中的方法 ———— - httpResponse() | render(request) | redirect('/index') | 用户 < ...
分类:
其他好文 时间:
2017-11-05 11:25:11
阅读次数:
181
1,请求重定向:客户端行为,response.sendRedirect(),从本质上讲等同于两次请求,前一次的请求对象不会保持,地址栏的URL地址会改变。 2,请求转发:服务器行为,request.getRequsetDispatcher().forward(requset,response);是一 ...
分类:
其他好文 时间:
2017-11-04 23:43:58
阅读次数:
346
python中源码位置(以urllib为例):python中自带的模块:/usr/lib/python3.5/urllib/request.py(python3)/usr/lib/python2.7/urllib2.py(python2)python的第三方模块:/usr/local/lib/python2.7/site-packages/注意:关于urllib模块,python3中的导入方法为importurllib.request.方法..
分类:
其他好文 时间:
2017-11-04 23:41:18
阅读次数:
165
1控制器验证 $this->validate($request,[ 'Student.name'=>'required|min:2|max:20', 'Student.age'=>'required|integer', 'Student.sex'=>'required|integer', ],[ ' ...
分类:
其他好文 时间:
2017-11-04 22:30:19
阅读次数:
355
.c文件; VOD_REQUEST VODrequest(void){ unsigned char* message_request="12,1234,192.168.9.98,55051"; int data_len=4; int i; printf("++++++++++++++++++++++ ...
分类:
其他好文 时间:
2017-11-04 20:54:36
阅读次数:
127
1、GET请求 # 1、无参数实例 import requests ret = requests.get('https://github.com/timeline.json') print ret.url print ret.text # 2、有参数实例 import requests payloa ...
分类:
其他好文 时间:
2017-11-04 20:51:07
阅读次数:
149
对于express的设置,一直是拿来就用,只知其然,今天查了一下文档,记录详细过程如下。 1、实现基本常用功能需要的模块path 用来处理路径字符串拼接,设置模板路径和静态资源路径时使用cookie-parser 设置应用的请求对cookie的支持body-parser 处理request请求内容, ...
分类:
Web程序 时间:
2017-11-04 20:37:54
阅读次数:
254
一:Nginx 后端服务器组的配置: 1、upstream: 用于设置后端服务器组的主要指令,upstream类似于之前的server块或http块,用法如下: upstreame Myserver{ #ip_hash; #least_conn; #fair; #hash $request_uri; ...
分类:
其他好文 时间:
2017-11-04 18:09:26
阅读次数:
244