php redirec code example
Example 1: php redirect
//PHP redirect
header("Location: https://www.codegrepper.com/my-redirect-page.php");
die();
Example 2: php header location
<?php
// This will just redirect you to example.com
header("Location: https://example.com");
?>
Example 3: How do I make a redirect in PHP?
header("Location: http://example.com/redirect_page.php");
die(); //Force the script to quit, or you would raise an error...
Example 4: how to redirect to php
function location($where){
echo '<script>window.location.href="'.$where.'"</script>';
}
location("https://youtube.com");
Example 5: php header
header ( string $header [, bool $replace = TRUE [, int $http_response_code ]] ) : void