Re: URL Parsing...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux