This section is the ninth section of the PHP introductory tutorial. It introduces the relevant content about PHP predefined arrays. Interested friends can refer to it.
Contents of this section: PHP predefined array What is a predefined array? Automatic global variables---superglobal array 1. Contains data from the web server, client, operating environment and user input 2. These arrays are special 3. It automatically takes effect in the global scope and you can use these arrays directly. 4. Users cannot customize these arrays 5. These arrays can be used directly in functions $_GET //Variables submitted to the script via URL request $_POST //Submit script variables via HTTP POST method $_REQUEST //Variables submitted to the script via get, post and cookie mechanisms, so this array is not worthy of trust and use, try not to use it $_FILES //Submit to script via http post file upload, file upload $_COOKIE //Session control $_SESSION //Session control $_ENV //Submit the execution environment to the script $GLOBALS //As long as the variables that are valid in the current script are all here, the array key name is the name of the global variable $_SERVER //Variables are set by the web server or directly associated with the current script execution environment>> View more php introductory tutorials |