matthimatiker/stack-static-files 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

matthimatiker/stack-static-files

最新稳定版本:0.0.1

Composer 安装命令:

composer require matthimatiker/stack-static-files

包简介

StackPHP middleware that serves static files from a configured asset directory.

README 文档

README

Build Status Coverage Status

Simple StackPHP middleware that serves files from a given directory. If the requested file does not exist, then the request is delegated to the next kernel.

Motivation

This middleware has been created to be able to use php-pm/php-pm with php-pm/php-pm-httpkernel as a standalone server. It avoided the need of nginx for serving static files.

Installation

This library is installed via Composer. Add the following dependency to your composer.json:

"require" :  {
    // ...
    "matthimatiker/stack-static-files": "^0.0.1"
}

Concept

Usage

You can use stack/builder to compose your middleware stack:

$stack = (new Builder())->push(StaticFiles::class, __DIR__ . '/public-files');
$app = $stack->resolve($kernel);

Alternatively, you can combine kernel and middleware manually:

$app = new StaticFiles($kernel,  __DIR__ . '/public-files');

Known Issues

Do not register a directory, which contains files that should not be served! This middleware has no security baked in and will serve any existing file, for example PHP scripts, VCS files etc.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固