PHP code example of reliv / serve-static

1. Go to this page and download the library: Download reliv/serve-static library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

reliv / serve-static example snippets


$app->pipe('/fun-module/assets', new \Reliv\ServeStatic\ServeStaticMiddleware(
    __DIR__ . '/../vendor/fund-module/public',
    ['publicCachePath' => __DIR__ . '/../public/fun-module/assets']
));