3 Star 40 Fork 12

糖水不加糖 / thinkphp-swoole3-demo

 / 详情

AAA 常量也是一样 这个是什么问题呀?

已关闭
创建于  
2021-02-21 17:48

[think\exception\ErrorException]
Uncaught think\exception\ErrorException: Constant AAA already defined in /home/wwwroot/hc.ieniu.net/app/event/InitConfig.php:68
Stack trace:
#0 [internal function]: think\initializer\Error->appError(8, 'Constant _AAA...', '/home/wwwroot/h...', 68, Array)
#1:api投递消息,监听器不工作 /home/wwwroot/hc.ieniu.net/app/event/InitConfig.php(68): define('AAA', '/public')
#2:这个是什么问题呀?只是在事件上定义了一个常量 __ROOT__ 报错 /home/wwwroot/hc.ieniu.net/app/event/InitConfig.php(27): app\event\InitConfig->initConst()
#3:AAA 常量也是一样 这个是什么问题呀? [internal function]: app\event\InitConfig->handle()
#4:api投递消息这块的原理不是很明白,文档能不能说明详细点。 /home/wwwroot/hc.ieniu.net/vendor/topthink/framework/src/think/Container.php(328): ReflectionMethod->invokeArgs(Object(app\event\InitConfig), Array)
#5:用swoole_table支持同一个用户多端在线,不知道有没有什么好的思路? /home/wwwroot/hc.ieniu.net/vendor/topthink/framework/src/think/Container.php(361): think\Container->invokeMethod('handle', Array, false)
#6 /home/wwwroot/hc.ieniu.net/vendor/topthink/framework/src/think/Event.php(260): think\Container->invoke(Array, Array)
#7 /home/wwwroot/hc.ieniu.net/vendor/topthink/framework/src/think/Event.php(221): think\Event->dispatch('app\eve

评论 (1)

懒床分子 创建了任务
展开全部操作日志

输入图片说明
测试正常,请校验自身代码是否规范.另外有疑问请fork仓库并创建问题demo,将fork地址+demo文件位置标注,描述复现流程./app/event/InitConfig.php显然是自身项目工程文件,请勿提交私有项目相关信息做提问内容.

糖水不加糖 任务状态待办的 修改为已拒绝

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
PHP
1
https://gitee.com/tsbjt/thinkphp-swoole3-demo.git
git@gitee.com:tsbjt/thinkphp-swoole3-demo.git
tsbjt
thinkphp-swoole3-demo
thinkphp-swoole3-demo

搜索帮助