随笔分类 -  webman

php框架
摘要:一,代码: .env APP_PORT = 8788 config/process.php return [ 'webman' => [ 'handler' => Http::class, //'listen' => 'http://0.0.0.0:8787', 'listen' => 'http: 阅读全文
posted @ 2025-04-04 13:23 刘宏缔的架构森林 阅读(19) 评论(0) 推荐(0)
摘要:一,如果直接用header("Location")会无效 代码: header('Location: https://baidu.com'); return false; 无效: 页面不会跳转 二,解决方法: 代码:在controller中 return redirect('https://baid 阅读全文
posted @ 2025-03-15 15:14 刘宏缔的架构森林 阅读(20) 评论(0) 推荐(0)
摘要:一,查看帮助: $ php start.php help Usage: php yourfile <command> [mode] Commands: start Start worker in DEBUG mode. Use mode -d to start in DAEMON mode. sto 阅读全文
posted @ 2025-01-12 21:24 刘宏缔的架构森林 阅读(51) 评论(0) 推荐(0)
摘要:一,报错代码: // 验证码长度 $length = 4; // 包含哪些字符 $chars = '0123456789abcefghijklmnopqrstuvwxyz'; $builder = new PhraseBuilder($length, $chars); $captcha = new 阅读全文
posted @ 2025-01-05 19:42 刘宏缔的架构森林 阅读(61) 评论(0) 推荐(0)
摘要:一,相关文档 https://www.workerman.net/doc/webman/plugin/console.html 二,创建一个空的命令行程序 1,用webman命令创建 $ php webman make:command StatMonthCommand Make command St 阅读全文
posted @ 2025-01-05 19:41 刘宏缔的架构森林 阅读(32) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://webman.workerman.net/doc/zh-cn/others/bin.html 二,报错的处理: 1, $ php webman build:bin Route /delete ["app\\controller\\LoginController", 阅读全文
posted @ 2024-12-21 10:14 刘宏缔的架构森林 阅读(92) 评论(0) 推荐(0)
摘要:一,文档地址: https://www.workerman.net/doc/webman/db/tutorial.html 二,安装所需的库 $ composer require -W illuminate/database illuminate/pagination illuminate/even 阅读全文
posted @ 2024-12-21 09:54 刘宏缔的架构森林 阅读(41) 评论(0) 推荐(0)
摘要:一,安装 $ composer require twig/twig 二,配置 config/view.php <?php /** * This file is part of webman. * * Licensed under The MIT License * For full copyrigh 阅读全文
posted @ 2024-12-21 09:43 刘宏缔的架构森林 阅读(28) 评论(0) 推荐(0)
摘要:一,报错信息: worker[webman:225916] exit with status 139 进程会退出 二,解决: 禁用opcache模块:在php.ini中注释掉opcache,使它不生效,如下: [opcache] ;opcache.enable=1 ;opcache.enable_c 阅读全文
posted @ 2023-10-04 22:40 刘宏缔的架构森林 阅读(146) 评论(0) 推荐(0)
摘要:一,vue: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 阅读全文
posted @ 2023-09-30 16:10 刘宏缔的架构森林 阅读(196) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://www.workerman.net/doc/webman/plugin/console.html 二,安装所需的库: 1,从命令行安装: liuhongdi@lhdpc:/data/webman/imageadmin$ composer require webma 阅读全文
posted @ 2023-09-22 11:20 刘宏缔的架构森林 阅读(351) 评论(0) 推荐(0)
摘要:一,官方文档: https://www.workerman.net/doc/webman/db/redis.html 二,安装库: 1,从命令行安装 liuhongdi@lhdpc:/data/webman/imageadmin$ composer require -W illuminate/red 阅读全文
posted @ 2023-09-22 11:16 刘宏缔的架构森林 阅读(351) 评论(0) 推荐(0)
摘要:webman:自动加载(v1.5.7)一,官方文档地址: https://www.workerman.net/doc/webman/others/autoload.html 二,实际操作 1,设置目录: 在项目根目录下新建目录 extend: 修改composer.json 增加以下代码: "psr-0" : { "": "extend 阅读全文
posted @ 2023-09-22 11:11 刘宏缔的架构森林 阅读(96) 评论(0) 推荐(0)
摘要:一,官方文档地址: 1,文档 https://www.workerman.net/doc/webman/components/captcha.html 2,用到的库项目代码地址: https://github.com/webman-php/captcha 二, 安装库: 1,用composer安装 阅读全文
posted @ 2023-09-19 21:09 刘宏缔的架构森林 阅读(176) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://www.workerman.net/doc/webman/others/nginx-proxy.html 二,配置nginx 添加一个host upstream webman { server 127.0.0.1:8787; keepalive 10240; } 阅读全文
posted @ 2023-09-19 15:01 刘宏缔的架构森林 阅读(377) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://www.workerman.net/doc/webman/components/validation.html 二,安装组件: 1,安装 liuhongdi@lhdpc:/data/webman/imageadmin$ composer require topth 阅读全文
posted @ 2023-08-28 15:18 刘宏缔的架构森林 阅读(282) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://www.workerman.net/doc/webman/config.html 二,代码: 1, .env: GOODS_IMAGE_DIR=/var/www/html/goodsImage GOODS_IMAGE_HOST=http://192.168.219 阅读全文
posted @ 2023-08-28 15:14 刘宏缔的架构森林 阅读(134) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://www.workerman.net/doc/webman/components/env.html 二,安装phpdotenv插件: liuhongdi@lhdpc:/data/webman/imageadmin$ composer require vlucas/p 阅读全文
posted @ 2023-08-23 09:57 刘宏缔的架构森林 阅读(301) 评论(0) 推荐(0)
摘要:一,官方文档: https://www.workerman.net/doc/webman/middleware.html 二,php代码: 1,配置路由的中间件 config/route.php 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 阅读全文
posted @ 2023-08-23 09:55 刘宏缔的架构森林 阅读(161) 评论(0) 推荐(0)
摘要:一,官方文档地址: https://www.workerman.net/doc/webman/middleware.html 二,php代码 1,配置中间件: config/middleware.php 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 阅读全文
posted @ 2023-08-23 09:52 刘宏缔的架构森林 阅读(262) 评论(0) 推荐(0)