lunes, 3 de enero de 2022

Variables

//Returns the filename of the currently executing script
echo $_SERVER['PHP_SELF'];    
//Returns the version of the Common Gateway Interface (CGI) the server is using
echo $_SERVER['GATEWAY_INTERFACE'];
//Returns the IP address of the host server     
echo $_SERVER['SERVER_ADDR'];
//Returns the name of the host server (such as www.w3schools.com)
echo $_SERVER['SERVER_NAME'];
//Returns the server identification string (such as Apache/2.2.24)
echo $_SERVER['SERVER_SOFTWARE'];
//Returns the name and revision of the information protocol (such as HTTP/1.1)
echo $_SERVER['SERVER_PROTOCOL'];;
//Returns the request method used to access the page (such as POST)    
echo $_SERVER['REQUEST_METHOD'];
//Returns the timestamp of the start of the request (such as 1377687496)
echo $_SERVER['REQUEST_TIME'];
//Returns the Accept header from the current request
echo $_SERVER['HTTP_ACCEPT'];
//Returns the Host header from the current request
echo $_SERVER['HTTP_HOST'];
//Returns the IP address from where the user is viewing the current page
echo $_SERVER['REMOTE_ADDR'];
//Returns the port being used on the user's machine to communicate with the web server
echo $_SERVER['REMOTE_PORT'];
//Returns the absolute pathname of the currently executing script
echo $_SERVER['SCRIPT_FILENAME'];
//Returns the value given to the SERVER_ADMIN directive in the web server configuration file (if your script runs on a virtual host, it will be the value defined for that virtual host) (such as someone@w3schools.com)
echo $_SERVER['SERVER_ADMIN'];
//Returns the port on the server machine being used by the web server for communication (such as 80)
echo $_SERVER['SERVER_PORT'];
//Returns the path of the current script

echo $_SERVER['SCRIPT_NAME'];

No hay comentarios:

Publicar un comentario