PHP and HTTP (php predefined variables)

Source: Internet
Author: User
Tags http file upload http post
PHP and HTTP (PHP pre-defined variables)
Var_dump ($_server[' Request_uri ');
Var_dump ($this->request->getrequesttype ());
Var_dump ($this->request->getisajaxrequest ());

Printing information
String ("/oms07/index.php?r=preshow/searchfails&idcname=jx&fromtime=2012-02-29&totime=2012-02-29") "
String (3) "GET"
BOOL (FALSE)


PHP provides a large number of predefined variables to all scripts. The variables represent everything from external variables to built-in environment variables, last error messages to last Retrieved headers.

Superglobals-superglobals is built-in variables that is always available in all scopes
$GLOBALS-references all variables available in global scope
$_server-server and execution Environment information
$_get-http GET variables
$_post-http POST variables
$_files-http File Upload variables
$_request-http REQUEST variables
$_session-session variables
$_env-environment variables
$_cookie-http Cookies
$php _errormsg-the Previous error message
$HTTP _raw_post_data-raw POST DATA
$http _response_header-http Response Headers
$ARGC-the Number of arguments passed to script
$ARGV-array of arguments passed to script


  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.