File code/class/Router/FastFileRouter.php

class Lia\FastFileRouter

Constants

Properties

Methods

  • static public function php($dir,$args=[]) Very quickly deliver a php file by appending the url to a directory
    Request url must end with a forward slash /
    GET params are removed from url
    .. is removed from url

  • static public function file($dir, $url=null) Very quickly deliver a file. Supports browser caching.
    Uses a very fast implementation for getting mimetypes. Each file extension has a *.txt file that contains its mimetype.

  • static public function send_file($file_path) send headers & output file

  • static public function get_mime_type($file_path)