[Note] CGI & PHP-PHP source code

Source: Internet
Author: User
Ec (2); CGI & amp; PHP transmits the data environment variable REQUEST_METHODGET to CGI: <ahref"cgi-binmyprog.exe? Lnameblow & amp; fnamejoe & quot; & gt; QUERY_STRINGPOST: By for script ec (2); script

CGI & PHP

Transmit data to CGI
========================================================== ========
Environment Variable REQUEST_METHOD
GET:

QUERY_STRING
POST: data transmitted by form
-The environmental variable CONTENT_LENGTH indicates the length.
-The CGI program reads data from stdin.
========================================================== ========

Other useful Environment Variables
========================================================== ========
Software Version of HTTP_USER_AGENT Browser
IP address of the REMOTE_ADDRESS Browser
REMOTE_HOST name of the browser
========================================================== ========

CGI output data
========================================================== ========
Non-analysis Header
-HTTP/1.0 200 OK
-Server: NCSA/1.0a6
-Content-type: text/html
-...
========================================================== ========

Content type: MIME text/css
========================================================== ========
Application
Audio
Image
Text
Video
Multipart

========================================================== ========


PHP
========================================================== ======================================
Basic syntax
========================================================== ========
1
2
This is a temporary cut" "
3

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.