2017 © Pedro Peláez
 

library staticfiles

This library will serve static files from a local directory

image

phramz/staticfiles

This library will serve static files from a local directory

  • Sunday, August 2, 2015
  • by Maximilian Reichel
  • Repository
  • 1 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Static Files

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight, (*1)

Staticfiles HttpServer acts like a simple webserver that serves static files from a local directory., (*2)

Install

Install with Composer:, (*3)

$ 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., (*4)

<?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., (*5)

Credits

Some of the 3rd party libraries in use:, (*6)

  • https://github.com/stackphp
  • https://github.com/symfony
  • https://github.com/webmozart
  • https://github.com/phpunit

The Versions

02/08 2015

dev-master

9999999-dev

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

stack webserver staticfiles

02/08 2015

v1.0.2

1.0.2.0

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

stack webserver staticfiles

02/08 2015

v1.0.1

1.0.1.0

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

stack webserver staticfiles

02/08 2015

v1.0.0

1.0.0.0

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

stack webserver staticfiles

31/07 2015

v0.1.2

0.1.2.0

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

middleware stack stackphp webserver staticfiles

31/07 2015

v0.1.1

0.1.1.0

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

middleware stack stackphp webserver staticfiles

31/07 2015

v0.1.0

0.1.0.0

This library will serve static files from a local directory

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Maximilian Reichel

middleware stack stackphp webserver staticfiles