Hi guys,
As part of my framework I have a URI decoder so it explode, remove unnecessary data (as GET query) amd put it into an array...
Is there any better way of doing this (faster?), just wondering.
if(isset($_SERVER['REQUEST_URI']) === true) { $path = explode('/',$_SERVER['SCRIPT_NAME']); $total_paths = count($path);
$path = stristr($_SERVER['REQUEST_URI'],$path[$total_paths-1]);
$path = explode('/',$path);
$total_paths = count($path);
$i = 0;
for($i=0;$i<$total_paths;$i++)
{
$get_string = false;
$get_string = stristr($path[$i],'?');
if($get_string)
{
$get_string = "\\".$get_string;
$this->uri[$i] = strtolower(addslashes(strip_tags(eregi_replace($get_string,'',$path[$i]) )));
}
else
{
$this->uri[$i] = strtolower(addslashes(strip_tags($path[$i])));
}
}
}
Regards, Bruno B B Magalhaes
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php