base url and SEF

From: Date: Wed, 20 Feb 2008 12:14:48 +0000
Subject: base url and SEF
Groups: php.general 
Request: Send a blank email to php-general+get-269707@lists.php.net to get a copy of this message
Hi all, I'm currently parsing the variable $_SERVER['PHP_SELF'] to get the base url of a site. Example: http://www.example.com/~eric/program/index.php?option=abc What I'm interested in getting is "http://www.example.com/~eric/program/", which I am able to get currently. Questions" 1) Are there security implications in using $_SERVER['PHP_SELF'], and if so, how do I mitigate it? 2) Is using this method safe for all sorts of browsers/servers that run php? 3) If I install an SEF software so that my url looks like http://www.example.com/~eric/program/a/b/c ,what will $_SERVER['PHP_SELF'] show? Thanks. Eric

« previous php.general (#269707) next »