Method
StaticFiles::__construct
Serve the files below $directory.
Description#
public StaticFiles::__construct(
string $directory
)Parameters#
- $directory string
- The document root; resolved to its real path now
Errors / Exceptions#
| Exception | When |
|---|---|
InvalidArgumentException | When $directory is not a directory |
Examples#
$files = new StaticFiles(__DIR__ . '/public');