标签:put 文件 div void get title open eve code
#include "stdafx.h" #include <stdio.h> #include <stdlib.h> #define DATAFILE "../web/data.txt" int main(void) { FILE *f = fopen(DATAFILE,"r"); int ch; if(f == NULL) { printf("%s%c%c\n", "Content-Type:text/html;charset=iso-8859-1",13,10); printf("<TITLE>Failure</TITLE>\n"); printf("<P><EM>Unable to open data file, sorry!</EM>"); } else { printf("%s%c%c\n", "Content-Type:text/plain;charset=iso-8859-1",13,10); while((ch=getc(f)) != EOF) putchar(ch); fclose(f); } return 0; }
读文件
标签:put 文件 div void get title open eve code
原文地址:https://www.cnblogs.com/https/p/10781671.html