note 55680 deleted from function.header by bjori
| From: | bjori@php.net | Date: | Mon, 27 Mar 2006 09:48:03 +0000 |
| Subject: | note 55680 deleted from function.header by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106720@lists.php.net to get a copy of this message | ||
Note Submitter: user at BOOMseebq dot com
----
Here's my redirect on a post:
<?php
// use the POST vars, set some SESSION vars
session_write_close();
$relative_url = "another.php";
header("Location: http://".$_SERVER['HTTP_HOST'].((dirname($_SERVER['PHP_SELF'])
== "/") ? "/" :
dirname($_SERVER['PHP_SELF'])."/").$relative_url);
exit;
?>
If the directory is not there, it just puts a "/", to indicate the doc root. I was
getting a http://domain//another.php (extra slash).