|
6#
楼主 |
发表于 2018-5-29 09:08:33
|
只看该作者
lr_start_transaction("download");
// lr_think_time(8);
web_reg_save_param_ex(
"ParamName=filecontent",
"LB=",
"RB=",
SEARCH_FILTERS,
"Scope=BODY",
LAST);
web_url("TopicFileServlet",
"URL=http://172.20.3.73:8080/FEMAS/TopicFileServlet?action=controldownload&fileId=901200000sems000000246409c2393ca&isDownload=true",
"Resource=1",
"RecContentType=application/octet-stream",
"Referer=",
"Snapshot=t144.inf",
LAST);
flen=web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
// lr_output_message(flen);
strcat( file,"E:\\testFile\\testfile" );
strcat( file,lr_eval_string("{fileName}"));
strcat( file,".doc" );
if(flen>0)
{
if((filedes=fopen(file,"wb"))==NULL)
{
lr_output_message("Open File Failed!", lr_eval_string("{filecontent}"));
return -1;
}
fwrite( lr_eval_string("{filecontent}"),flen,1,filedes );
fclose( filedes );
}
lr_end_transaction("download", LR_AUTO);
|
|