timer.php
<?php //创建websocket服务器对象,监听0.0.0.0:9502端口 $ws = new swoole_server("0.0.0.0", 9503); swoole_timer_tick(2000, function ($timer_id) { echo "执行第一次,\n"; });
启动
# php timer.php
© 著作权归作者所有
举报
发表评论
0/200
timer.php
<?php //创建websocket服务器对象,监听0.0.0.0:9502端口 $ws = new swoole_server("0.0.0.0", 9503); swoole_timer_tick(2000, function ($timer_id) { echo "执行第一次,\n"; });
启动
# php timer.php
© 著作权归作者所有
发表评论