Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gisostallenberg committed Mar 3, 2016
1 parent 935efd3 commit 2e3565d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require_once __DIR__ . '/../../vendor/autoload.php';

use GisoStallenberg\FileServing\FileServer;

$fileserver = new FileServer('../serve-me/', 'serve-it/');
$fileserver = new FileServer('../../serve-me/', 'serve-it/');
$fileserver->serve(); // will server http://example.com/serve-it/example.txt when ../serve-me/example.txt exists, gives a 404 otherwise
```

Expand All @@ -30,11 +30,11 @@ require_once __DIR__ . '/../../vendor/autoload.php';
use GisoStallenberg\FileServing\FileServer;
use Symfony\Component\HttpFoundation\Response;

$fileserver = new FileServer('../serve-me/', 'serve-it/');
$fileserver = new FileServer('../../serve-me/', 'serve-it/');
$response = $fileserver->getResponse(); // do not serve yet

if ($response->getStatusCode() === Response::HTTP_NOT_FOUND) {
$fileserver = new FileServer('../serve-other-dir/', 'serve-it/'); // check another directory
$fileserver = new FileServer('../../erve-other-dir/', 'serve-it/'); // check another directory
$response = $fileserver->getResponse();
}

Expand Down

0 comments on commit 2e3565d

Please sign in to comment.