Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xtgxiso authored Nov 14, 2016
1 parent 3e18167 commit a0f0753
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ WebWorker
========
https://github.com/xtgxiso/WebWorker-benchmark

##安装

```
composer require xtgxiso/webworker
```

快速开始
======
demo.php
Expand All @@ -34,22 +40,7 @@ use WebWorker\Libs\Mredis;
use WebWorker\Libs\Mdb;
use WebWorker\Libs\Mmysqli;

//判断系统
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
require_once __DIR__.'/workerman-for-win/Autoloader.php';
}else {
require_once __DIR__.'/workerman/Autoloader.php';
// 检查扩展
if(!extension_loaded('pcntl'))
{
exit("Please install pcntl extension. See http://doc3.workerman.net/install/install.html\n");
}

if(!extension_loaded('posix'))
{
exit("Please install posix extension. See http://doc3.workerman.net/install/install.html\n");
}
}
require_once 'vendor/autoload.php';

$app = new WebWorker\App("http://0.0.0.0:1215");

Expand Down

0 comments on commit a0f0753

Please sign in to comment.