$gateway = new Gateway("ws://127.0.0.1:8282");改为
$gateway = new Gateway("websocket://0.0.0.0:8282");php 开启扩展sockets