3

requesturi

request_uri
SYNOPSIS

request_uri()

DESCRIPTION
CODE
  1. function request_uri() {
  2.     if (isset($_SERVER['REQUEST_URI'])) {
  3.         $uri = $_SERVER['REQUEST_URI'];
  4.     }
  5.     else {
  6.         if (isset($_SERVER['argv'])) {
  7.             $uri = $_SERVER['SCRIPT_NAME'] .'?'. $_SERVER['argv'][0];
  8.         }
  9.         elseif (isset($_SERVER['QUERY_STRING'])) {
  10.             $uri = $_SERVER['SCRIPT_NAME'] .'?'. $_SERVER['QUERY_STRING'];
  11.         }
  12.         else {
  13.             $uri = $_SERVER['SCRIPT_NAME'];
  14.         }
  15.     }
  16.  
  17.     $uri = '/'. ltrim($uri, '/');
  18.  
  19.     return $uri;
  20. }
SEE ALSO

engine

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

===

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].