PHP code example of lizhichao / one-demo

1. Go to this page and download the library: Download lizhichao/one-demo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lizhichao / one-demo example snippets


#启动
php App/swoole.php test_ws_router

#测试地址
http://127.0.0.1:8081/ws/router

#打开浏览器控制台 send(url,content)
send('a','xxxx')

#启动
php App/swoole.php test_ws

#测试地址
http://127.0.0.1:8081/ws

#打开浏览器控制台 send(content)
send('xxxx')

#启动
php App/swoole.php test_tcp_router


#启动
php App/swoole.php test_tcp


#启动globalData
php App/swoole.php global_data

#启动服务
php App/swoole.php test_all

#打开地址
http://127.0.0.1:8081/mix