note 38840 deleted from function.headers-sent by victor

From: Date: Sat, 27 Mar 2004 20:30:48 +0000
Subject: note 38840 deleted from function.headers-sent by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67253@lists.php.net to get a copy of this message
Note Submitter: php@fufachew.com ---- // or something like this: (works for me) function server_url() { if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") { $proto = "https://"; } else { $proto = "http://"; } return $proto . $_SERVER['HTTP_HOST']; } function redirect_rel($relative_url) { if (!headers_sent()) { header("Location: " . server_url() . dirname($_SERVER['PHP_SELF']) . "/" .$relative_url); } else { echo "<meta http-equiv=\"refresh\" content=\"0;". server_url() . dirname($_SERVER['PHP_SELF']) . "/" .$relative_url . "\">\n"; } }

« previous php.notes (#67253) next »