header("Content-Type: text/html"); header("Cache-Control: no-cache, must-revalidate");
header("HTTP/1.0 404 Not Found"); echo "Page not found";
header("Location: http://www.example.com/newpage.php"); exit;Package library: PHP core. These examples demonstrate the use of PHP's built-in header() function to set HTTP headers for page rendering and server interaction. The header function is part of PHP's core library and does not require any external package dependencies.