2 Star 10 Fork 8

糖水不加糖 / thinkphp-swoole3-demo

 / 详情

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

Declined
Opened this issue  
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 /home/wwwroot/hc.ieniu.net/vendor/topthink/framework/src/think/Container.php(328): ReflectionMethod->invokeArgs(Object(app\event\InitConfig), Array)
#5 /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

Comments (1)

懒床分子 created任务
展开全部操作日志

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

糖水不加糖 changed issue state from 待办的 to 已拒绝

Sign in to comment

状态
Assignees
Labels
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(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

Search