PHP Redirect with header

PHP Redirect

header() is used to send a raw HTTP header.

Header (location) redirect must be processed before any output to the browser.

Example:

<?php
$text = '<?php header('Location: http://www.example.com'); ?>';
?>

Leave a Reply