PHP code example of waynesun01 / swooletest
1. Go to this page and download the library: Download waynesun01/swooletest 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/ */
waynesun01 / swooletest example snippets
define('BASEDIR', __DIR__);
p';
$config = [
'Host'=>'0.0.0.0',
'Port'=>9501,
'Behavior'=>'\app\imBehavior', //具体行为类
'Set'=>[
'worker_num'=>2, //onTask必须设置
'task_worker_num'=>4,
]
];
//