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

Using $this when not in object context #4

Closed
wqcsimple opened this issue Mar 29, 2015 · 10 comments
Closed

Using $this when not in object context #4

wqcsimple opened this issue Mar 29, 2015 · 10 comments

Comments

@wqcsimple
Copy link

$options = array(
    'appId'          => 'xxxx',
    'secret'         => 'xxxxxx'
    'token'          => 'xxxx',
    'encodingAESKey' => 'xxx'
);



$wechat = Wechat::make($options);
$wechat->on('message', function($message) {
    return Message::make('text')->content('您好!'.$message->FromUserName);
});


$result = $wechat->serve();

echo $result;

我这么写了,可是网页上出现下面这个错误
Fatal error: Using $this when not in object context in /var/www/html/wwhis.com/www/src/Wechat/Wechat.php on line 113

@overtrue
Copy link
Collaborator

@wqcsimple 刚才确认了一遍没有重现上述情况,估计你使用的不是最新版本,之前却实有报过这个错误,如果再次遇到请告知我你使用的版本

@wqcsimple
Copy link
Author

@overtrue https://github.com/overtrue/wechat 我这个地址clone,这个版本不是最新的吗?最好来个版本号

@overtrue
Copy link
Collaborator

@wqcsimple 你再git pull 一次试试,因为我现在的版本没有出现你说的情况,最近两天有修改

@wqcsimple
Copy link
Author

看了你的分享,对这个模板比较感兴趣,请问能否共享的
http://overtrue.gitbooks.io/building-web-apps-with-laravel5/content/index.html

@overtrue
Copy link
Collaborator

@wqcsimple 这不是什么模板,这是GitBook生成的电子书:https://www.gitbook.com/

@overtrue
Copy link
Collaborator

@wqcsimple 另外上面的问题解决了没?

@wqcsimple
Copy link
Author

@overtrue 原来是gitbook的,差点就要自己写一个了

@overtrue
Copy link
Collaborator

@wqcsimple 不要在上面透露你的应用信息

@overtrue
Copy link
Collaborator

@wqcsimple 你的QQ发我一下

@wqcsimple
Copy link
Author

@overtrue 466817823

TheNorthMemory added a commit to TheNorthMemory/wechat that referenced this issue May 18, 2015
TheNorthMemory added a commit to TheNorthMemory/wechat that referenced this issue May 18, 2015
overtrue added a commit that referenced this issue May 18, 2015
TheNorthMemory added a commit to TheNorthMemory/wechat that referenced this issue May 19, 2015
overtrue added a commit that referenced this issue May 19, 2015
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

2 participants