码迷,mamicode.com
首页 > Web开发 > 详细

web_reg_find()查询信息为变量

时间:2015-02-11 16:01:37      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:

Action()
{
char *str1;//=(char*)malloc(20);
char str2[10];

web_url("toLoginPage",
"URL={Url}/login",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer={Url}/index",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/sprites_login.png", ENDITEM,
"Url=/images/login_ico.jpg", ENDITEM,
LAST);


lr_start_transaction("立刻登录");


web_submit_data("login.action",
"Action={Url}/login/userLogin",
"Method=POST",
"TargetFrame=",
"RecContentType=text/json",
"Referer={Url}/toLoginPage",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=autosession", "Value=false", ENDITEM,
"Name=verify", "Value=请输入验证码", ENDITEM,
"Name=_GLOBAL_SESSION_DUPLICATE_SWITCH", "Value=true", ENDITEM,
"Name=_GLOBAL_REQUEST_DUPLICATE_KEY", "Value={duplicate_key}", ENDITEM,
//关联信息 "Value=eecf72ec-c866-4beb-8d96-b04215ecd72a"
"Name=_GLOBAL_SUBMIT_TYPE_KEY", "Value=ajax", ENDITEM,
LAST);


str1=lr_eval_string("{username}");
strncpy(str2,str1,3);
lr_output_message("str2= %s",str2);
lr_save_string(str2,"str_name");


web_reg_find("Fail=NotFound","Search=All",
"SaveCount=Counts",
"Text={str_name}**!",
LAST);

web_url("index",
"URL={Url_1}/index",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t78.inf",
"Mode=HTML",
LAST);

lr_output_message("user:%s",lr_eval_string("{username}"));
lr_end_transaction("立刻登录",LR_AUTO);


return 0;
}

web_reg_find()查询信息为变量

标签:

原文地址:http://www.cnblogs.com/bingpoli/p/4286080.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!