“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
webman-視圖-twig視圖模板的使用
发布时间:2022-01-20 23:29:19作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
webman中除了内置的是Raw視圖,他還支持twig視圖。首先需要謹記必須在start.php同目錄執行twig安裝命令如:[root@localhost webman]# /usr/local/php734/bin/php -c /usr/loca
阅读全文>>webman-中间件-中间件向控制器传参
发布时间:2022-01-19 22:40:38作者:雪饮
![[!--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 information, please see th
阅读全文>>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
阅读全文>>