上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 169 下一页
摘要: 一,创建项目 创建目录: $ mkdir imagebank $ cd imagebank/ 创建项目: $ go mod init imagebank go: creating new go.mod: module imagebank 引入gin第三方库 liuhongdi@lhdpc:/data 阅读全文
posted @ 2025-01-29 16:01 刘宏缔的架构森林 阅读(55) 评论(0) 推荐(0)
摘要: 一,配置日志 在config/autoload/logger.php中增加一项对日志的配置: 'daily' => [ 'handler' => [ 'class' => Monolog\Handler\RotatingFileHandler::class, 'constructor' => [ ' 阅读全文
posted @ 2025-01-25 11:26 刘宏缔的架构森林 阅读(157) 评论(0) 推荐(0)
摘要: 一,创建controller $ php bin/hyperf.php gen:controller ImageController App\Controller\ImageController created successfully. 配置路由: Router::addGroup('/image 阅读全文
posted @ 2025-01-25 11:26 刘宏缔的架构森林 阅读(84) 评论(0) 推荐(0)
摘要: 一,安装第三方库 $ composer require hyperf/watcher --dev 二,配置 1,生成配置文件: $ php bin/hyperf.php vendor:publish hyperf/watcher [hyperf/watcher] publishes [config] 阅读全文
posted @ 2025-01-25 11:26 刘宏缔的架构森林 阅读(169) 评论(0) 推荐(0)
摘要: 一,查看帮助 $ php bin/hyperf.php help 二,查看可用的命令: $ php bin/hyperf.php 三,创建一个命令 $ php bin/hyperf.php gen:command DemoCommand 代码如下: <?php declare(strict_type 阅读全文
posted @ 2025-01-25 11:26 刘宏缔的架构森林 阅读(202) 评论(0) 推荐(0)
摘要: 一,报错信息: 1,代码: //根据id得到一条点击记录 func GetOnePicHitByPid(pid int64) (*model.HitsModel, error) { fields := []string{"id", "pid", "hits", "addtime"} plOne:=& 阅读全文
posted @ 2025-01-25 11:26 刘宏缔的架构森林 阅读(159) 评论(0) 推荐(0)
摘要: 一,官网: https://www.hyperf.io/ 二,安装: composer create-project hyperf/hyperf-skeleton 问到的一些问题和我的设置: Creating a "hyperf/hyperf-skeleton" project at "./hype 阅读全文
posted @ 2025-01-25 11:25 刘宏缔的架构森林 阅读(198) 评论(0) 推荐(0)
摘要: 一,安装fresh库 $ go get github.com/pilu/fresh 二,遇到问题: 执行fresh时报错: $ fresh fresh:未找到命令 解决: $ go install github.com/pilu/fresh@latest 再次执行: $ go get github. 阅读全文
posted @ 2025-01-18 16:51 刘宏缔的架构森林 阅读(343) 评论(0) 推荐(0)
摘要: 一,官网: 官方文档: https://pkg.go.dev/github.com/go-playground/validator/v10 代码地址: https://github.com/go-playground/validator 二、常用标记说明 标记 标记说明 例 required 必填 阅读全文
posted @ 2025-01-18 16:51 刘宏缔的架构森林 阅读(304) 评论(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 刘宏缔的架构森林 阅读(104) 评论(0) 推荐(0)
上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 169 下一页