【文件属性】:
文件名称:http-server-static-content:Amp HTTP服务器的静态内容响应器
文件大小:15KB
文件格式:ZIP
更新时间:2021-02-02 02:39:37
php http http-server amphp static-files
http-server-static-content
该包为提供了静态内容RequestHandler 。
用法
DocumentRoot实现RequestHandler 。
例
<?php
use Amp \ Http \ Server \ RequestHandler \ CallableRequestHandler ;
use Amp \ Http \ Server \ Response ;
use Amp \ Http \ Server \ Router ;
use Amp \ Http \ Server \ Server ;
use Amp \ Http \ Server \ StaticContent \ DocumentRoot ;
use Amp \ Http \ Status ;
$ documentRoot = new DocumentRoot (__DIR__ . '/public' );
$ router = new Amp \ Http \ Server \ Router ;
$ router -> addRoute ( 'GET' , '/' , new
【文件预览】:
http-server-static-content-master
----src()
--------DocumentRoot.php(25KB)
--------Internal()
--------functions.php(3KB)
----resources()
--------mime(8KB)
----LICENSE(1KB)
----composer.json(2KB)
----examples()
--------server.php(2KB)
--------public()
----README.md(792B)