Re: URL Parsing...

From: Date: Sun, 25 Nov 2007 12:44:59 +0000
Subject: Re: URL Parsing...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-265005@lists.php.net to get a copy of this message
one of these should give you something to go on: echo preg_replace('\.cfm$', '-meta.cfm', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)), "\n"; echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['PATH_TRANSLATED']), "\n"; echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['SCRIPT_FILENAME']), "\n";
Anything would be helpful. :)
You don't need the overhead of PCRE, though it is the fastest to write, since it's already above for you... Or parse_url(). basename(__FILE__) will get you the filename. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support

« previous php.general (#265005) next »