note 52366 deleted from function.header by bjori

From: Date: Mon, 27 Mar 2006 09:51:00 +0000
Subject: note 52366 deleted from function.header by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106727@lists.php.net to get a copy of this message
Note Submitter: mephistos at ighettomail dot com ---- I hope this little redirection function might be useful to someone: <? function redirect($url = NULL, $relative = FALSE) { header("Location: http://".$_SERVER['HTTP_HOST'].(($relative) ? dirname($_SERVER['PHP_SELF'])."/" : "/").$url); exit; } ?> If no url is specified it will redirect to server root and if relative is set to true it will redirect using a relavite path.

« previous php.notes (#106727) next »