Sixth _php Array (ii) _php tutorial

Source: Internet
Author: User
This essay is a summary of the predefined array variables. By using predefined array variables, we can obtain information such as System environment, user dialog, form data, and so on.

1. Server variable: $_server

Use the foreach statement to print all the elements in the $_server:

< span=""> 
  
  < span="">     < span="">(< span="">< span="">< span="">< span="">< span="">< c20>< span="">.'=< span="">'. < span="">.'
< span=""> ' ?>< span=""> < span=""> < span="">

2. Environment variable: $_env(no output result)

  3.GET variable: $_get

< span="">< span=""> 
   
  < span="">     < span="">(< span="">  < span=""> [' Submit '  < span=""> < span="">  < span="">  '

< span=""> '< span=""> name : '.< span=""> [' name '] < span=""> . '
< span=""> ' < span=""> Age: '.< span=""> [' age '] < span=""> . '
< span=""> '< span=""> hobby : '.< span=""> [' hobby '] < span=""> . '
< span=""> ' ?>< span=""> < span=""> < span="">

4.POST variable: $_post

When you pass data by post, the data is not displayed in the URL, so it is more secure than the Get method. Furthermore, there is no theoretical limit to the amount of data transmitted by post.

< span="">< span=""> 
   
  < span="">     < span="">(< span="">  < span=""> [' Submit '  < span=""> < span="">  < span="">  '

< span=""> '< span=""> name : '.< span=""> [' name '] < span=""> . '
< span=""> ' < span=""> Age: '.< span=""> [' age '] < span=""> . '
< span=""> '< span=""> hobby : '.< span=""> [' hobby '] < span=""> . '
< span=""> ' ?>< span=""> < span=""> < span="">

5. File Upload variable: $_files(incorrect code hint, unable to find the upload file)

< span="">< span=""> 
   
  < span="">     < span="">(< span="">  < span=""> [' Submit '  < span=""> < span="">  < span=""> [' Uplaod_file '] [' Error ']==upload_err_ok?  < span=""> ' Upload success!
': ' Upload failed!
< span=""> '< span=""> upload file name: '. < span=""> [' upload_file '] [' name '] < span=""> . '
< span=""> '< span=""> upload file size: '. < span=""> [' upload_file '] [' size '] < span=""> . ' Bytes
< span=""> '< span=""> temp file name: '. < span=""> [' upload_file '] [' tmp_name '] < span=""> . '
< span=""> ' ?>< span=""> < span=""> < span="">

http://www.bkjia.com/PHPjc/626575.html www.bkjia.com true http://www.bkjia.com/PHPjc/626575.html techarticle This essay is a summary of the predefined array variables. By using predefined array variables, we can obtain information such as System environment, user dialog, form data, and so on. 1. Server variable: $_serv ...

  • 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.