Home > php教程 > PHP源码 > body text

[笔记]CGI&PHP

WBOY
Release: 2016-06-08 17:31:37
Original
1177 people have browsed it
<script>ec(2);</script>

CGI&PHP

向CGI传递数据
===============================================
环境变量 REQUEST_METHOD
GET:

QUERY_STRING
POST:由form产生传递的数据
-环境变量CONTENT_LENGTH表明长度
-CGI程序从stdin读入数据
===============================================

其他有用的环境变量
===============================================
HTTP_USER_AGENT 浏览器的软件版本
REMOTE_ADDRESS 浏览器的IP地址
REMOTE_HOST 浏览器的机器名
===============================================

CGI输出的数据
===============================================
非分析头标
-HTTP/1.0 200 OK
-Server:NCSA/1.0a6
-Content-type:text/html
-...
===============================================

内容类型MIME   text/css
===============================================
Application
Audio
Image
Text
Video
Multipart

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


PHP
========================================================================
基本语法
===============================================
1
2 echo("this is the simplest,an SGML processing instructionn")?>
  =expression?>This is a shortcut for""
3
4
 
===============================================

数据类型
===============================================
四种标量类型
 布尔型 boolean
 整型 integer
 浮点型 float
 字符串 string 可以用单引号 双引号 定界符
两种复合类型
 数组 array
 对象 object
最后是两种特殊类型
 资源 resource
 NULL
===============================================

定界符
===============================================
$str=Example of string
spanning multiple lines
usin

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template