以下代码生成错误"下标超出范围",我不知道为什么.有人可以解释一下吗?
Dim errorc As Integer
Dim myarray() As Variant
errorc = 1
If Len(Me.txt_Listnum) = 0 Then
ReDim Preserve myarray(errorc)
myarray(errorc) = "Numer Listy"
errorc = errorc + 1
End If
If Len(Me.cbo_ByWho) = 0 Then
ReDim Preserve myarray(errorc)
myarray(errorc) = "Wystawione przez"
errorc = errorc + 1
End If
If Len(Me.cbo_ForWho) = 0 Then
ReDim Preserve myarray(errorc)
myarray(errorc) = "Wystawione na"
errorc = errorc + 1
End If
For i = LBound(myarray) To UBound(myarray)
msg = msg & myarray(i) …Run Code Online (Sandbox Code Playgroud) 情况:如何在页面getuser.php中加密json,然后在index.php中对其进行解密?
我得到了一个echo (json_encode($data));使用示例输出创建的getuser.php
{
"id": 2,
"username": "Teeto",
"surname": "",
"password": "somepassword",
"lastlogin": "2014-02-18 15:35:01",
"level": 0
}
Run Code Online (Sandbox Code Playgroud)
然后我将数据发送到jquery
$.ajax({
type: 'POST',
url: "getuserdata.php?id="+ otherPro,
datatype: 'json',
success: function(data){
$.each(data, function (key, value) {
$( '#' + key ).val( value );
});
}
});
Run Code Online (Sandbox Code Playgroud)
谢谢你的任何提示.