ÆÄÀÏÀ» ¾÷·ÎµåÇÒ·Á°íÇϴµ¥ 500¼¹ö¿¡·¯°¡ ³³´Ï´Ù. ¿¡·¯¸Þ¼¼Áö¸¦ º¸´Ï±î cgi-header :unable to find LFLF ÀÌ·±¿¡·¯°¡ ³ª´Â±º¿ä printf("Content-type:text/html\n\n")ÀÌ·¸°Ô ÀÛ¼ºÇؼ ³Ö¾ú´Âµ¥µµ ±×·¸±º¿ä #include<stdio.h> #include "qDecoder.h"
int strcheck(char *str){ if(str==NULL) return 0; if(strlen(str)==0) return 0; return 1; }
int main() { FILE *fp; char *filedata, *filename; long filelen; int i; printf("Content-type:text/html\n\n"); filename=qValue("upgrade_file.filename"); if(!strcheck(filename))qError("ÆÄÀÏÀÌ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù."); filedata =qValue("upgrade_file"); filelen=strtol(qValue("upfile.length"),(char**)NULL,10); fp=fopen("word.c","a+"); if(!fp) qError("ÆÄÀÏÀ» ÀúÀåÇÒ¼ö ¾ø½À´Ï´Ù"); for(i=0;i<filelen;i++) fprintf(fp,"%c",filedata[i]); fclose(fp); system("mv word.c 1.c "); qFree(); } ¼Ò½ºÀÔ´Ï´Ù. ÇØ°áÇØ ÁÖ¼¼¿ä
|