Return to Snippet

Revision: 13885
at May 10, 2009 08:54 by flatearthcomms


Initial Code
// REPLACE FOLDERS WITH NOTHING
// str_replace(find_this, replace_with_this, string_to_search );
// This strips folder names from the path
$me = str_replace("/acme/project/090331/", "", $_SERVER["REQUEST_URI"] );
//$me = ereg_replace ( find_this, replace_with_this, string_to_search );
// This strips #anything from end of url
$me = ereg_replace ( "#(.*)", "", $me );

Initial URL


Initial Description
Useful for comparing file path when developing on different test sites, leaves just file name, also strips named anchors from end

Initial Title
STRIP CURRENT URL OF ARBITRARY FOLDERS AND NAME ANCHOR

Initial Tags


Initial Language
PHP