摘要: 一,配置日志 在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)