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

使用flightphp框架,验证URL的时候,在Apache下接入成功,在Nginx接入失败 #126

Closed
imyip opened this issue Oct 17, 2015 · 4 comments

Comments

@imyip
Copy link

imyip commented Oct 17, 2015

我是使用flightphp框架,url重写规则均按照教程写入
然而验证URL的时候,在Apache下接入成功,在Nginx接入失败
貌似是http类的get方法没有起作用

@parkshinhye
Copy link
Contributor

@imyip 可否粘贴一下代码

@imyip
Copy link
Author

imyip commented Oct 17, 2015

@a939638621 这是在框架里面的调用

Flight::route('/weixin',function(){
    Overtrue\Wechat\Alias::register();
    $server = new WechatServer("xxxxxxxxxxxx", "xxxxx");
    $server->on('message', 'text', function($message) {
        return WechatMessage::make('text')->content($message->Content);
    });
    $result = $server->serve();
    echo $result;
});

Flight::start();

我感觉是nginx的问题

@parkshinhye
Copy link
Contributor

@imyip 服务器验证 你看看这个wiki 的内容

@overtrue
Copy link
Collaborator

你在echo $result; 前把 error_log("result: ".$result); 写到日志看一下就知道了嘛,如果都没产生日志,那肯定是你的web服务器问题了

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