Search:

Categories



PHP Constants and predefined vars

Constant Description
bool define(string name, mixed value, [bool sensitive]) define constant
mixed constant(string name) show const value
bool defined(string name) check if is definded
array get_defined_constants(bool categ.) show all defined const.
bool function_exists( string function) check if function exists
array get_defined_functions() show defined function
mixed call_user_func(string func, [string param1…]) Call the callback given by the first parameter
bool is_callable(mixed var, [bool syntax, string, name]) check if function is callable
$_SERVER[‘PHP_SELF’] The filename of the currently executing script, relative to the document root.
GATE_INTERFACE CGI specificatoin
$_SERVER[‘SERVER_ADDR’] server IP adress
SERVER_NAME server Hostname
$_SERVER[‘SERVER_SOFTWARE’] Server identification string, given in the headers when responding to requests
SERVER_PROTOCOL server protocol
$_SERVER[‘SERVER_ADMIN’] The value given to the SERVER_ADMIN (for Apache) directive in the web server configuration file
$_SERVER[‘SERVER_PORT´] The port on the server machine being used by the web server for communication.
$_SERVER[‘SERVER_SIGNATURE´] String containing the server version and virtual host name which are added to server-generated pages, if enabled
$_SERVER[‘REQUEST_METHOD’] Which request method was used to access the page; i.e. ‘GET’, ‘HEAD’, ‘POST’, ‘PUT’.
REQUEST_TIME The timestamp of the start of the request.
$_SERVER[‘QUERY_STRING’] La chaîne de requête, si elle existe, qui est utilisée pour accéder à la page.
$_SERVER[‘DOCUMENT_ROOT’] The document root directory under which the current script is executing, as defined in the server’s configuration file.
$_SERVER[‘HTTP_ACCEPT’] Contents of the Accept: header from the current request, if there is one.
$_SERVER[‘HTTP_ACCEPT_CHARSET’] Contents of the Accept-Charset: header from the current request, if there is one
$_SERVER[‘HTTP_ACCEPT_ENCODING’] Contents of the Accept-Encoding: header from the current request, if there is one
$_SERVER[‘HTTP_ACCEPT_LANGUAGE’] Contents of the Accept-Language: header from the current request, if there is one
$_SERVER[‘HTTP_CONNECTION’] Contents of the Connection: header from the current request, if there is one
HTTP_HOST Contents of the Host: header from the current request, if there is one.
HTTP_REFERER The address of the page (if any) which referred the user agent to the current page
$_SERVER[‘HTTP_USER_AGENT’] Contents of the User-Agent: header from the current request, if there is one
HTTPS Secure HTTP protocol
$_SERVER[‘REMOTE_ADDR’] The IP address from which the user is viewing the current page.
$_SERVER[‘REMOTE_HOST’] The Host name from which the user is viewing the current page.
$_SERVER[‘REMOTE_PORT’] The port being used on the user’s machine to communicate with the web server.
$_SERVER[‘SCRIPT_FILENAME’] The absolute pathname of the currently executing script.
$_SERVER[‘PATH_TRANSLATED’] Filesystem- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping.
$_SERVER[‘SCRIPT_NAME’] Contains the current script’s path
$_SERVER[‘REQUEST_URI’] The URI which was given in order to access this page
$_SERVER[‘PHP_AUTH_DIGEST’] When doing Digest HTTP authentication this variable is set to the ‘Authorization’ header sent by the client
$_SERVER[‘PHP_AUTH_USER’] When doing HTTP authentication this variable is set to the username provided by the user.
PHP_AUTH_PW When doing HTTP authentication this variable is set to the password provided by the user.
$_SERVER[‘AUTH_TYPE’] When doing HTTP authenticated this variable is set to the authentication type.
argc Number of params
$_SERVER[‘argv’] Array of arguments passed to the script
Share

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  


*