request_path: Returns the requested URL path of the page being viewed

One of the small function but very handy for developers in Drupal is request_path

It Returns the requested URL path of the page being viewed.

Examples of request_path():

http://example.com/node/306

    returns “node/306″              

http://example.com/drupalfolder/node/306

    returns “node/306″ while base_path() returns “/drupalfolder/

 http://example.com/path/alias

    returns “path/alias” as opposed to the internal path

http://example.com/en/path/alias

    returns en/path/alias

http://example.com/index.php

    returns an empty string (meaning: front page)

http://example.com/index.php?page=1

    returns an empty string