关联报错
经检查一个服务器返回的浏览器客户端ID 需要关联查看源代码我想需要关联的就是红色部分
var i = 0;
153 for (i = 0; i < frObj.length; i++) {
154 strid = "{username:'" + frObj.username + "',usertype:'"
155 + frObj.usertype
156 + "',client:'"
157 + frObj.client + "',"
158 + "nickname:'" + frObj.nickname
159 + "',cp:'" + frObj.cp + "', vip:'" + frObj.vip + "',roomid:'"
160 + frObj.roomid + "',roomnum:'" + frObj.roomnum + "',photo:'"
161 + frObj.photo + "',check:'" + frObj.check + "',dayNum:'"
162 + frObj.dayNum + "',monthNum:'" + frObj.monthNum + "',mobile:'"
163 + frObj.mobile + "',intro:'" + frObj.intro + "',port:'" + frObj.port
164 + "',postid:'" + frObj.postid + "'}"
服务器里面myelipse找到的代码
for (i = 0; i < message.data.length; i++) {
var struser = message.data;
struser=decodeURI(struser);
var user = eval('(' + struser + ')');
if (user.username == room._username) {
room._user2 = room._user.substring(0, room._user
.indexOf(',')
+ 1)
+ "client:'"
+ user.client
+ "',"
+ room._user.substring(room._user.indexOf(',') + 1);
room._fromClient = user.client;
我的关联函数是这样设的
web_reg_save_param("{client_name}",
"LB=',client:",
"RB=,",
"search=body",
LAST);
其实左右边界值我取了很多了 但还是报错:
Action.c(144): Error -26377: No match found for the requested parameter "{client_name}". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(144): web_custom_request("connect") highest severity level was "ERROR", 130 body bytes, 136 header bytes
[ 本帖最后由 kratexi 于 2010-7-3 16:41 编辑 ] web_reg_save_param("client_name",
"LB=',client:",
"RB=\',",
"search=body",
LAST);
转义一个单引号试试 多谢回复..
按照你所写的尝试了下 还是报相同错误
对了 我LR录制脚本里每次显示是这样的clientId\":\"1cj8t40t4ozylh799h\"
红色部分为动态值
[ 本帖最后由 kratexi 于 2010-7-3 17:06 编辑 ] 你要先找到服务器返回的数据包的具体内容,然后才能决定到底关联的边界是什么,如果按照你上面的写法
那么关联的边界应该是
LB=clientld\\\":\\\"
RB=\\\"
注意转义符 我按照
LB=clientld\\\":\\\"
RB=\\\"
来的话会编译提示错误
我查看了服务器console
visitor876857',client:'1utevpfhzwmd25jvmq',usertype:'0',nickname......
Busername:'test022',client:'1xwvxyenfcxhxij402',usertype:'1'
client有两个不同的值 我想这样需要关联两次这个client的值吧
左边界值
"LB=client:'",
右
"RB=',"
这样写是不是可以呢
[ 本帖最后由 kratexi 于 2010-7-3 18:10 编辑 ]
页:
[1]