PHP code example of zhanguangcheng / linkerman

1. Go to this page and download the library: Download zhanguangcheng/linkerman 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/ */

    

zhanguangcheng / linkerman example snippets




use Linkerman\Linkerman;
use Workerman\Connection\TcpConnection;
use Workerman\Protocols\Http\Request;
use Workerman\Worker;

erStart = static function () {
    



use yii\base\InvalidConfigException;
use yii\web\Application;

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER', false);

get_clean();
}

// Workerman Connection Object
$GLOBALS['WORKERMAN_CONNECTION'];

// Workerman Request Object
$GLOBALS['WORKERMAN_REQUEST'];
bash
php server.php start