TA的每日心情 | 开心 2014-10-24 09:36 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
简单的示例程序,放到Action()中即可运行
Action()
{
int iflen;
long lfbody;
web_set_max_html_param_len("10000");
web_reg_save_param("Downexe","LB=","RB=",LAST);
web_url("downloadprocess",
"URL=http://www.cn-java.com/download/07.pdf",
"Resource=1",
"RecContentType=application/pdfl",
"Referer=",
LAST);
iflen=web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
lr_output_message("%d",iflen);
if(iflen>0){
if((lfbody=fopen("c:\\fetion.pdf","wb"))==NULL)
{
lr_output_message("Error when write file");
return -1;
}
fwrite(lr_eval_string("{Downexe}"),iflen,1,lfbody);
lr_output_message("write successful");
fclose(lfbody);
}
return 0;
} |
|