承接 phramz/staticfiles 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

phramz/staticfiles

最新稳定版本:v1.0.2

Composer 安装命令:

composer require phramz/staticfiles

包简介

This library will serve static files from a local directory

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight

Staticfiles HttpServer acts like a simple webserver that serves static files from a local directory.

Install

Install with Composer:

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require phramz/staticfiles

Example

The first example shows how to use Staticfiles as standalone application.

<?php

use Symfony\Component\HttpFoundation\Request;

// your static files will be served from this folder
$webroot = '/var/www';

// if we cannot guess the files mime-type we'll use this default
$defaultMimetype = 'application/octed-stream';

// files with the following extensions will not be delivered. We'll get a 404 instead.
$exclude = ['php', 'key'];

// let's build our application
$app = new Phramz\Staticfiles\HttpServer($webroot, $defaultMimetype, $exclude);

// dispatch the request
$request = Request::createFromGlobals();

$response = $app->handle($request);
$response->send();

// and shutdown
$app->terminate($request, $response);

LICENSE

This project is under MIT license. Please read the LICENSE file for further information.

Credits

Some of the 3rd party libraries in use:

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固