a de facto standard called Common Gateway Interface(CGI——通用网关接口)
The Common Gateway Interface (CGI) is a standard (see RFC 3875: CGI Version 1.1) method for web server software to delegate the generation of web content to executable files. Such files are known as CGI scripts; they are programs, often stand-alone applications, usually written in a scripting language.
\r是“光标”回到本行行首
\n是“光标”移到下一行行首。
MS的换行符是\r\n
UNIX的换行符是\n
MAC的换行符是\r
在微软的系统中,C 程序处理文本是自动转换这两个符号的
读的时候将 \r\n 自动当作一个字符 \n
写的时候写一个 \n 自动转换为 \r\n
造成一种误解,好象 \n 就是回车加换行
你可以向一个文件中写入一个 '\n ',用十六进制编辑器打开文件,会发现有两个字节 0D 0A, 就是 \r\n了,你读这个文件的时候,也只会读到一个字符 \n
The Common Gateway Interface (CGI) is a standard (see RFC 3875: CGI Version 1.1) method for web server software to delegate the generation of web content to executable files. Such files are known as CGI scripts; they are programs, often stand-alone applications, usually written in a scripting language.
\r是“光标”回到本行行首
\n是“光标”移到下一行行首。
MS的换行符是\r\n
UNIX的换行符是\n
MAC的换行符是\r
在微软的系统中,C 程序处理文本是自动转换这两个符号的
读的时候将 \r\n 自动当作一个字符 \n
写的时候写一个 \n 自动转换为 \r\n
造成一种误解,好象 \n 就是回车加换行
你可以向一个文件中写入一个 '\n ',用十六进制编辑器打开文件,会发现有两个字节 0D 0A, 就是 \r\n了,你读这个文件的时候,也只会读到一个字符 \n