“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
webman-中间件-中间件接口及示例
发布时间:2022-01-19 22:39:37作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
用到curl命令及相关参数curl 参数: --location:跟踪重定向 --request:指定要使用的请求命令 --header:要传递到服务器的行自定义标头(H)(就是自定义请求头咯) -d:post请求时候
阅读全文>>webman-中间件-跨域请求中间件(允许跨域配置)
发布时间:2022-01-19 22:38:42作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
允许一个接口路由跨域的路由配置config/route.php:<?php/** * This file is part of webman. * * Licensed under The MIT License * For full copyright and license info
阅读全文>>webman-路由-路由自动解析
发布时间:2022-01-19 22:37:30作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
路由自动解析当app目录结构非常复杂,webman无法自动解析时,可以利用反射自动配置路由,例如在config/route.php中添加如下代码$dir_iterator = new \RecursiveDirectoryIterato
阅读全文>>webman-路由-路由中间件
发布时间:2022-01-19 22:36:50作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
路由配置于config/route.php:给单个某个路由设置中间件,中间件可以有一个或多个实例: 路由配置: <?php /** * This file is part of webman. * * Licensed under The MIT L
阅读全文>>webman-路由-路由中间件 - 路由分组(嵌套分组)中使用路由中间件的注意事项
发布时间:2022-01-19 22:36:01作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
注意:->middleware() 路由中间件作用于 group 分组之后时候,当前路由必须在处于当前分组之下config/route.php中配置如:<?php/** * This file is part of webman. * * Licens
阅读全文>>