Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swoole下无法使用 #1017

Closed
hanwenbo opened this issue Nov 9, 2017 · 3 comments
Closed

swoole下无法使用 #1017

hanwenbo opened this issue Nov 9, 2017 · 3 comments

Comments

@hanwenbo
Copy link

hanwenbo commented Nov 9, 2017

我用的环境

PHP 版本:
overtrue/wechat 版本:
所有版本
是否使用了框架?框架名称:
Easyswoole

问题及现象

在swoole开发环境下 是没有$_GET $_POST等等这种代码的,
我赋值了 ,不过呢

 $this['request'] = function () {
            return Request::createFromGlobals();
        };

这句代码只能是加载你的Request,这导致我无法给你的getContent赋值,因为没提供赋值
描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段
Request类里写死了代码:
$request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $server);
想传都是不可以的 ,这不符合Prs7的标准

@hanwenbo
Copy link
Author

已经解决,回头补上教程 - - 继续撸了

@greedying
Copy link
Contributor

怎么解决的?莫非是自己弄个$_GET ?

@hanwenbo
Copy link
Author

自己弄超全局变量也行,继承Request类 重定义Message获取的方法也行

@overtrue overtrue closed this as completed Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants