0% found this document useful (0 votes)
17 views10 pages

$ - Server & $ - Request

$_SERVER is a PHP super global variable that holds information about headers, paths, and script locations set by the web server related to the runtime environment of the current PHP script. It contains data on the PHP self, server address, name, software, protocol, request method, time, query string, HTTP headers, host, remote port, script file name and admin. $_REQUEST collects submitted form data and functions similarly to other super global variables like $_GET and $_POST to store information numerically or associatively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views10 pages

$ - Server & $ - Request

$_SERVER is a PHP super global variable that holds information about headers, paths, and script locations set by the web server related to the runtime environment of the current PHP script. It contains data on the PHP self, server address, name, software, protocol, request method, time, query string, HTTP headers, host, remote port, script file name and admin. $_REQUEST collects submitted form data and functions similarly to other super global variables like $_GET and $_POST to store information numerically or associatively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

$_SERVER

&
$_REQUEST
$_SERVER

$_SERVER is a PHP super global variable which


holds information about headers, paths, and script
locations.
$_SERVER has following
basic properties:
1. Set by web server.

2. Directly related to the runtime environment of the


current PHP script.

3. It does the same job as $HTTP_SERVER_VARS used to


do in previous versions of PHP
Sample output of $_SERVER taken
from Local host
• PHP : $_SERVER['PHP_SELF']
• PHP : $_SERVER[‘ argv']
• PHP : Super global variable: $ argc
• PHP : $_SERVER['GATEWAY_INTERFACE']
• PHP : $_SERVER['SERVER_ADDR']
• PHP : $_SERVER['SERVER_NAME']
• PHP : $_SERVER['SERVER_SOFTWARE']
• PHP : $_SERVER['SERVER_PROTOCOL']
• PHP : $_SERVER['REQUEST_METHOD']
• PHP : $_SERVER['REQUEST_TIME']
• PHP : $_SERVER['QUERY_STRING']
• PHP : $_SERVER['HTTP_ACCEPT']
• PHP : $_SERVER['HTTP_ACCEPT_CHARSET']
• PHP : $_SERVER['HTTP_HOST']
• PHP : $_SERVER['REMOTE_PORT']
• PHP : $_SERVER['SCRIPT_FILENAME']
• PHP : $_SERVER['SERVER_ADMIN']
$_REQUEST
• is used to collect data after submitting an HTML
form.

• a super global array just like $_GET, $_POST,


$_COOKIE, $_SESSION etc. That means it can store a
list information numerically or associatively.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy