PHPackages                             phramz/staticfiles - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. phramz/staticfiles

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

phramz/staticfiles
==================

This library will serve static files from a local directory

v1.0.2(10y ago)0521MITPHPPHP &gt;=5.5.9

Since Jul 31Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phramz/staticfiles)[ Packagist](https://packagist.org/packages/phramz/staticfiles)[ RSS](/packages/phramz-staticfiles/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (7)Used By (1)

Static Files
============

[](#static-files)

[![Build Status](https://camo.githubusercontent.com/c6f5822a8dca9ffabfddf244b6b464d4ac4dde3467134455465660084323fd72/68747470733a2f2f7472617669732d63692e6f72672f706872616d7a2f73746174696366696c65732e737667)](https://travis-ci.org/phramz/staticfiles) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/6c95ad28f8b9f832a73c38bd52a121441cca72a5ff6af66ab4390cc48db01d99/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706872616d7a2f73746174696366696c65732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phramz/staticfiles/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/fdad37039f1d7a1fa9d249d69a48bb07dc8ecc1de6dc7b24a702d3ef46855cbc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706872616d7a2f73746174696366696c65732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phramz/staticfiles/?branch=master) [![SensioLabsInsight](https://camo.githubusercontent.com/92cafeb9544c8f3e1707e349400ef0e39c05af8145e9ff4787c9e5a9457daf85/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f64656163623532622d393438372d346664372d393932342d3963323365323832356261362f6d696e692e706e67)](https://insight.sensiolabs.com/projects/deacb52b-9487-4fd7-9924-9c23e2825ba6)

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

Install
-------

[](#install)

Install with Composer:

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

Example
-------

[](#example)

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

```
