美文网首页
hyperf_nano初体验

hyperf_nano初体验

作者: rosekissyou | 来源:发表于2020-06-20 21:03 被阅读0次

1 新建空目录

composer require hyperf/nano

2 新建入口文件index.php

get('/', function () {

    $user = $this->request->input('user', 'nano');

    $method = $this->request->getMethod();

    return [

        'message' => "hello {$user}",

        'method' => $method,

    ];

});

$app->run();

3 运行

php index.php start

相关文章

网友评论

      本文标题:hyperf_nano初体验

      本文链接:https://www.haomeiwen.com/subject/dlklahtx.html