Communauté « Blogs « L'espace perso de Jmarc « Pense-bête «
$_SERVER
Liste des informations contenues dans la variable $_SERVER.
exemple avec url de type : .../articles/view.php?id=10&action=page-de-test
$_SERVER : array =
HTTP_ACCEPT: string = "image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*"
HTTP_REFERER: string = "http://localhost/yacs/articles/view.php?id=10&action=page-de-test"
HTTP_ACCEPT_LANGUAGE: string = "fr"
HTTP_ACCEPT_ENCODING: string = "gzip, deflate"
HTTP_USER_AGENT: string = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
HTTP_HOST: string = "localhost"
HTTP_CONNECTION: string = "Keep-Alive"
HTTP_COOKIE: string = "rating_9=5; poll_33=1; screening=2%7C1266269271%7C1%7C7d5f4981a056cf284f04543cce6516e0; comment_info_name=Nick; comment_info_mail=toto%40mail.com; rating_22=5; rating_28=5; surfer_name=Jmarc; screening=2%7C1266269271%7C1%7C7d5f4981a056cf284f04543cce6516e0; DBGSESSID=402265803674800002%40127.0.0.1%3A7869%3Bd%3D1%2Cp%3D0%2Cc%3D1%2Cs%3D-1; PHPSESSID=t71r516h6g4u0bj7vt2gal6hr4; TimeZone=1; FlashIsAvailable=null"
PATH: string = "D:\\WINDOWS2\\system32;D:\\WINDOWS2;D:\\WINDOWS2\\System32\\Wbem;D:\\Program Files\\QuickTime\\QTSystem\\"
SystemRoot: string = "D:\\WINDOWS2"
COMSPEC: string = "D:\\WINDOWS2\\system32\\cmd.exe"
PATHEXT: string = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"
WINDIR: string = "D:\\WINDOWS2"
SERVER_SIGNATURE: string = ""
SERVER_SOFTWARE: string = "Apache/2.2.11 (Win32) PHP/5.3.0"
SERVER_NAME: string = "localhost"
SERVER_ADDR: string = "127.0.0.1"
SERVER_PORT: string = "80"
REMOTE_ADDR: string = "127.0.0.1"
DOCUMENT_ROOT: string = "C:/wamp/www/"
SERVER_ADMIN: string = "admin@localhost"
SCRIPT_FILENAME: string = "C:/wamp/www/yacs/articles/view.php"
REMOTE_PORT: string = "3506"
GATEWAY_INTERFACE: string = "CGI/1.1"
SERVER_PROTOCOL: string = "HTTP/1.1"
REQUEST_METHOD: string = "GET"
QUERY_STRING: string = "id=10&action=page-de-test"
REQUEST_URI: string = "/yacs/articles/view.php?id=10&action=page-de-test"
SCRIPT_NAME: string = "/yacs/articles/view.php"
PHP_SELF: string = "/yacs/articles/view.php"
REQUEST_TIME: long = 1266415116
Si url de type : /yacs_path/articles/view.php/10/page-de-test
alors PATH_INFO: string = "/10/page-de-test"










