关于lr脚本的求助
web_submit_data("pay.do","Action=http://ip地址/TengRen/pay.do?p=dopay",
"Method=POST",
"RecContentType=text/html",
"Referer=http://ip地址/TengRen/billing/pay/pay_card.jsp",
"Snapshot=t16.inf",
"Mode=HTML",
ITEMDATA,
"Name=vcode", "Value=1234", ENDITEM,
"Name=username", "Value=test0100", ENDITEM,
"Name=username2", "Value=test0100", ENDITEM,
"Name=cp01", "Value=V0XDY", ENDITEM,
"Name=cp02", "Value=4IJB3", ENDITEM,
"Name=cp03", "Value=QYQ8E", ENDITEM,
"Name=cp04", "Value=6LF5I", ENDITEM,
"Name=source", "Value=", ENDITEM,
"Name=paytype", "Value=1", ENDITEM,
"Name=cardtype", "Value=1", ENDITEM,
LAST);
现在cp01到cp04的内容是一个参数{card}
格式如V0XDY4IJB3QYQ8E6LF5I,20位.
我现在要把这个参数拆分成4个,所以我写了如下程序
char cp;char cp1,cp2,cp3,cp4;
lr_save_string(lr_eval_string("{card}"),"cp");
cp1=cp&cp&cp&cp&cp;
cp2=cp&cp&cp&cp&cp;
cp3=cp&cp&cp&cp&cp;
cp4=cp&cp&cp&cp&cp;
web_submit_data("pay.do",
"Action=http://ip地址/TengRen/pay.do?p=dopay",
"Method=POST",
"RecContentType=text/html",
"Referer=http://ip地址/TengRen/billing/pay/pay_card.jsp",
"Snapshot=t16.inf",
"Mode=HTML",
ITEMDATA,
"Name=vcode", "Value=1234", ENDITEM,
"Name=username", "Value=test0100", ENDITEM,
"Name=username2", "Value=test0100", ENDITEM,
"Name=cp01", "Value=(cp1)", ENDITEM,
"Name=cp02", "Value=(cp2)", ENDITEM,
"Name=cp03", "Value=(cp3)", ENDITEM,
"Name=cp04", "Value=(cp4)", ENDITEM,
"Name=source", "Value=", ENDITEM,
"Name=paytype", "Value=1", ENDITEM,
"Name=cardtype", "Value=1", ENDITEM,
LAST);
没有报错,但是就是不成功,不知道我哪里错了.谁能帮我看一下啊? lr_save_string(lr_eval_string("{card}"),"cp");这个可以把字符串保存到数组中去?
你这个做法是把card的这个参数保存到cp这个参数中去。。。 关于字符串分割可以使用lr_save_var()函数来处理 恩啊,按你说的用ue处理了数据,完成工作先.一直用ue,从来没注意过那个列...
想了想还是不把分割放到程序里了,减轻点lr的运算.
不过先记下了,回头有空再研究lr_save_var()的用法.lr_save_string是放到参数里啊,我一直以为是变量来着....
页:
[1]