1-пео╒нд╠╬ё╛2-д?б╪кВрЩё╛3-хуфзкВрЩ║ё
ц?ху╫╚иЗЁи╣дхЩвИнд╪Чиоть╣╫оЮс╕╣двсд?б╪╪╢й╣ожак╤тпео╒╣дц?ху╦Эпб║ё
╥╫╟╦╣дсе╣Цё╨
ц?ху╣дн╛╩╓╪Р╣╔ё╛╡ывВхщрвё╛р╩╟Ц╡ывВт╠╤╪дэ╨э?Лиойж║ё
уШ╦Ж╡ывВ╟╡х╚нх╤╗ё╛╡╩╩АЁЖожа╛╫сжп╤омЬж╥ур╡╩╣╫╣дгИ?Ж║ё
╥ясц╨э╣мё╛╡╩пХр╙╧╨бР╢СпмйЩ╬щ?БхМ╪Ч╨м╠Юп╢в╗р╣╣д╡Ия╞хМ╪Ч║ё
й╣ожй╠╪Д╤лё╛дэ╧╩тз╫о╤л╣дй╠╪ДюОй╣ожпео╒╣д╤╞л╛мЬио╥╒╡╪║ё
程序清单:
#include < stdio.h >
#include < string.h >
#include < conio.h >
#define LANXMAX 150
FILE *FileR,*FileW,*FileWIndex;
char Path1[]="c:\\html\\mrcj\\";
char Path2[]="c:\\html\\mrcj\\txt\\";
char Path3[50];
char Path4[]="c:\\html\\ccrindex.htm";
char Path5[]="c:\\html\\html.ini";
char Path6[]="c:\\html\\html-1";
char Path7[]="c:\\html\\html-2";
char Month[10],Date[10];
char FileName[50];
char FileNameIndex[20];
char FilePath1[50]; //...08\\
char FilePath2[50]; //...08\\jxxta\\
char WriteFileName[50];
char IndexFileName[50];
char FileBak[5];
char LanMu;
char Time[20];
char YEAR;
char IndexLANMU[6][19]={"中外财经要闻","法律法规政策","经济形势分析",
"企业改革透视","社会保障制度","改革发展研究"};
int FileNum;
int Yea,Mon,Dat;
void FileIni()
{
switch(Yea)
{
case 98:
case 1998:
YEAR=''B'';
break;
case 99:
case 1999:
YEAR=''J'';
break;
default: YEAR=''B'';
}
if(Yea< 100) Yea+=1900;
FileNum=0;
sprintf(FilePath1,"c:\\fl\\%02d\\",Dat);
sprintf(FileBak,".%1X%02d",Mon,Dat);
}
void AddFileProc(int num)
{
char FLanRead[LANXMAX];
char MainLan[LANXMAX];
char FENLEI[50];
char IndexLan[150];
int i;
sprintf(FENLEI,".中国改革.每日财经信息.%02d月%02d日\r<br>\r\n<br>\r\n",Mon,Dat);
printf("*");
sprintf(FileName,"%sjxxt%c%03d%s",FilePath2,LanMu,num,FileBak);
if(!(FileR=fopen(FileName,"rb")))
{
printf("cannot open this file\n");
return;
}
//-add htmlhead
fputs("< html > \r\n< body background="../../../../images/bk_creform.jpg\">\r\n",FileW);
//-add htmlhead
fputs(FENLEI,FileW);
fgets(FLanRead,LANXMAX-5,FileR);
//-add index procedure-
sprintf(IndexLan,"< a href=\"txt/%02d/%s\" target=\"new\">%s<br>\r",Dat,FileNameIndex,FLanRead);
//fputs("< br >",FileWIndex);
fputs(IndexLan,FileWIndex);
//-add index procedure-
while(!feof(FileR))
{
fputs("< br >",FileW);
fputs(FLanRead,FileW);
strcpy(FLanRead,"");
fgets(FLan
|