Source Code for /public/404.php

<?php
// Include the functions.php file, which provides functions we use all over the place:
require_once('inc/functions.php');

// Send a HTTP 404 header so browsers and search engines know not to cache it etc.
header('HTTP/1.1 404 Not Found');

// Render our HTML header, but no sidebar
add_header('404: Not Found', true);
?>

<h2>Oh no! No page here!</h2>

<p>
  The page you're looking for doesn't exist. Sorry.
</p>
<p>
  If you got here by following a link, it's a bad link. Maybe let the owner of the page
  you came from know about it?
</p>

<h2>Let's get you back on track...</h2>
<p>
  Maybe one of these links will help you to find your way:
</p>
<ul>
  <li>
    <a href="/">Start from the homepage of this site</a>
  </li>
  <li>
    <a href="/toc/">Browse the table of contents</a>
  </li>
  <li>
    Or maybe, <a href="https://php.danq.dev/source-viewer.php?file=public/404.php">read the PHP source code of this 404 page!</a>
  </li>
</ul>

<?php draw_potion( 'yellow' ); ?>

<?php
// Render our HTML footer
add_footer();
?>