tags:

views:

28

answers:

2

domain.com/hello/world/

How do I only get the /hello/world/ part?

Update: How could I get domain.com/hello/world?

+1  A: 
$_SERVER['PHP_SELF'];
Michael Mrozek
This includes the file name
Doug
@Doug name can be easily cut out
Col. Shrapnel
@Doug If you don't want the file name you should probably edit the question to say that; the "path" of a file includes the name itself
Michael Mrozek
+1  A: 

$_SERVER['REQUEST_URI'] is the actual uri in the browser.

Evert
This will get all GET params too, if that's what you want.
alex
@alex it can be easily cut out, while it's the only way to get actual request. E.g. if mod_rewrite being used.
Col. Shrapnel