diff --git a/App.php b/App.php index 53ca93f..8d2b5da 100644 --- a/App.php +++ b/App.php @@ -17,7 +17,7 @@ class App extends Worker * * @var string */ - const VERSION = '0.2.2'; + const VERSION = '0.2.3'; private $conn = false; private $map = array(); diff --git a/README.md b/README.md index df8fa9e..188488d 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,14 @@ $app->HandleFunc("/json",function() { $this->ServerJson(array("name"=>"WebWorker")); }); +//注册路由/ +$app->HandleFunc("/",function() { + //自定义响应头 + $this->Header("server: xtgxiso"); + //以json格式响应 + $this->ServerJson(array("name"=>"WebWorker")); +}); + //注册路由input $app->HandleFunc("/input",function() { //获取body