How to create 404 error page in PHP code example
Example 1: php create 404 error
<?php
http_response_code(404);
include('my_404.php'); // provide your own HTML for the error page
die();
Example 2: how to create 404 page in php website
ErrorDocument 404 /404page.html