|
<div class="cnblogs_code">
wget https:
.phar /usr/bin/composer
-g repo.packagist composer https:
overtrue/wechat:~4.0 -vvv
<div class="cnblogs_code">
(()."/vendor/autoload.php"<span style="color: #800080">$options =<span style="color: #000000"> [
'app_id' => 'wx3cf0f39249eb0exxx','secret' => 'f1c242f4f28f735d4687abb469072xxx','token' => 'easywechat','log' =><span style="color: #000000"> [
'level' => 'debug','file' => '/tmp/easywechat.log',<span style="color: #000000">
],<span style="color: #008000">//<span style="color: #008000"> ...
<span style="color: #000000">];
<span style="color: #800080">$app = Factory::officialAccount(<span style="color: #800080">$options<span style="color: #000000">);
<span style="color: #800080">$server = <span style="color: #800080">$app-><span style="color: #000000">server;
<span style="color: #800080">$user = <span style="color: #800080">$app-><span style="color: #000000">user;
<span style="color: #800080">$server->push(<span style="color: #0000ff">function(<span style="color: #800080">$message) <span style="color: #0000ff">use (<span style="color: #800080">$user<span style="color: #000000">) {
<span style="color: #800080">$fromUser = <span style="color: #800080">$user->get(<span style="color: #800080">$message['FromUserName'<span style="color: #000000">]);
</span><span style="color: #0000ff">return</span> "{<span style="color: #800080">$fromUser</span>->nickname} 您好!欢迎关注 overtrue!"<span style="color: #000000">;
});
<span style="color: #800080">$server->serve()->send(); (编辑:安卓应用网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|