1. Go to this page and download the library: Download webiik/staticpage 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/ */
webiik / staticpage example snippets
public function run(): void
{
// Page URI
$uri = '/foo/bar/';
// Page template
$page = '<h1>Meow World!</h1>';
// Save static file the web server will try to serve with every next request
$staticPage = new Webiik\StaticPage\StaticPage();
$staticPage->save($page, $uri);
// Show dynamic page when the server didn't serve the static page
echo $page;
}