1. in PHP, the name of the current script (excluding the path and query string) is recorded in the predefined variable (1; the URL of the previous page linked to the current page is recorded in the predefined variable (2? Php page address, SCRIPT_NAME can also be: phptest. phpecho $ _ SERVER [PHP_SELF]. br; link to the current page
1. in PHP, the name of the current script (excluding the path and query string) is recorded in the predefined variable (1; the URL of the previous page linked to the current page is recorded in the predefined variable (2? Php // This page address, SCRIPT_NAME can also be: php/test. php echo $ _ SERVER ['php_self ']. br/; // link to the current page
1. in PHP, the name of the current script (excluding the path and query string) is recorded in the predefined variable (1; the URL of the previous page linked to the current page is recorded in the predefined variable (2 ).
// This page address, SCRIPT_NAME can also be: php/test. php
Echo $ _ SERVER ['php _ SELF ']."
";
// URL of the previous page linked to the current page:
Echo $ _ SERVER ['HTTP _ referer']."
";
// For other pre-defined variables, see reference manual: Language Reference variables.
// The absolute path name of the script before execution: D: Inetpubwwwrootphp est. php
Echo $ _ SERVER ["SCRIPT_FILENAME"]."
";
// Browsing the IP address of the user on the current page: 127.0.0.1
Echo $ _ SERVER ["REMOTE_ADDR"]."
";
// Query string (the first question mark in the URL? ): Id = 1 & bi = 2
Echo $ _ SERVER ["QUERY_STRING"]."
";
// The root directory of the file where the script is currently running: d: inetpubwwwroot
Echo $ _ SERVER ["DOCUMENT_ROOT"]."
";
?>
2. Execution Section Output __.
// Reference manual Language Reference operator Arithmetic Operator % is a modulo operation and outputs 0
Echo 8% (-2 )."
";
// The result of Modulo $ a % $ B when $ a is a negative value is also a negative value. Output-2
Echo (-8) % 3 )."
";
// Output 2
Echo (8% (-3 ))."
";
?>
3. In HTTP 1.0, Status Code 401 indicates ____. If the "file not found" prompt is returned, the header function is available, and its statement is ____.
Answer: 401 indicates that authorization is Not performed. header ("HTTP/1.0 404 Not Found"). [See reference manual> function reference> HTTP function header]
4. The role of the Array Function arsort is ____; the role of the error_reporting (2047) Statement is ____.
A: arsort: sorts arrays in reverse order and maintains the index relationship error_reporting (2047). report All errors and warnings
5. Write a regular expression to overwrite all JS/VBS scripts on the web page (that is, remove the script tag and its content ):
$ Script = "the following content is not displayed: