how to set 404 page in php on server code example
Example 1: how to check website 404 status in php
<?php
$url = 'http://google.com';
if(@file_get_contents($url)){
echo "Website is up";
} else {
echo "Website is down";
}
?>
Example 2: how to create 404 page in php website
ErrorDocument 404 /404page.html