PHP code example of slogsdon / flat-file

1. Go to this page and download the library: Download slogsdon/flat-file 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/ */

    

slogsdon / flat-file example snippets


 /* pages/index.php */ 

 declare(strict_types=1);

$uri = $_SERVER['REQUEST_URI'];

if ($uri !== '/' && file_exists(getcwd() . '/public' . $uri)) {
    return false;
}