note 18241 added to function.header

From: Date: Tue, 15 Jan 2002 20:54:21 +0000
Subject: note 18241 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-24854@lists.php.net to get a copy of this message
The recommended method for redirecting has some extra "/" that you should remove in your app. The "/" before dirname is extra. Also you should check that the dirname of PHP_SELF is not just "/" and only then add it. $url="http://".$HTTP_SERVER_VARS['HTTP_HOST']; if (dirname($HTTP_SERVER_VARS['PHP_SELF'])!="/") $url.=dirname($HTTP_SERVER_VARS['PHP_SELF']); header("Location: ".$url."/".$relative_url); -- http://www.php.net/manual/en/function.header.php http://master.php.net/manage/user-notes.php?action=edit+18241 http://master.php.net/manage/user-notes.php?action=delete+18241 http://master.php.net/manage/user-notes.php?action=reject+18241

« previous php.notes (#24854) next »