jQuery实现QQ空间图片展示效果

时间:2023-02-08 22:15:04

Index.html

图片浏览支持键盘左右方向键,增强用户体验

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QQ Photo</title>
<link rel="stylesheet" href="css/base.css?ver=1.1.0">
<link rel="stylesheet" href="css/style.css?ver=1.1.0">
</head>
<body>
<ul class="thumb-list clearfix">
<li><a href="javascript:void(0);"><img src="http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/200/h/200" width="200" height="200" /></a></li>
<li><a href="javascript:void(0);"><img src="http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/200/h/200" width="200" height="200" /></a></li>
<li><a href="javascript:void(0);"><img src="http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/200/h/200" width="200" height="200" /></a></li>
<li><a href="javascript:void(0);"><img src="http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/200/h/200" width="200" height="200" /></a></li>
<li><a href="javascript:void(0);"><img src="http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/200/h/200" width="200" height="200" /></a></li>

</ul>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/QQPhoto.min.js?ver=1.1.0"></script>
<script type="text/javascript">
$( '.thumb-list li' ).QQPhoto({
url : 'data.json', //获取相册列表数据的URL地址 需要返回 JSON 格式,请参考文件 data.json 格式来输出
commentURL : 'api.php', //提交评论 Ajax 发送到 服务器端的地址 返回 JSON 格式,请参考文件 comment.json 格式来输出
fix : 5, //表示相册列表左右间距的距离 默认 5
minTextLen : 3, //发送评论时 表单验证,最少不能少于的字符 默认三个字符
maxTextLen : 140, //发送评论时 表单验证,最多不能少于的字符 默认140个字符
fadeIn : true, //图片默认是否开启淡入效果,默认为 false
lazyload: 'images/lazyload.gif', //默认lazyload的图片,默认为1px.gif 透明图片
loadding : 'images/loading.gif' //loading.gif 的文件路径
});
</script>
</body>
</html>

data.json

{
"code": 1,
"album": "默认相册",
"showimages": "20.jpg",
"thumbList": [
{
"id": "1.jpg",
"title": "图片1",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢1!",
"thumb": "http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/1.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下"
}
]
},
{
"id": "2.jpg",
"title": "图片2",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢2!",
"thumb": "http://gitphoto.qiniudn.com/2.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/2.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下2"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下2"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下2"
}
]
},
{
"id": "3.jpg",
"title": "图片3",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢3!",
"thumb": "http://gitphoto.qiniudn.com/3.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/3.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下3"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下3"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下3"
}
]
},
{
"id": "4.jpg",
"title": "图片4",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢4!",
"thumb": "http://gitphoto.qiniudn.com/4.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/4.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下4"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下4"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下4"
}
]
},
{
"id": "5.jpg",
"title": "图片5",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢5!",
"thumb": "http://gitphoto.qiniudn.com/5.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/5.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下5"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下5"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下5"
}
]
},
{
"id": "6.jpg",
"title": "图片6",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢6!",
"thumb": "http://gitphoto.qiniudn.com/6.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/6.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下6"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下6"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下6"
}
]
},
{
"id": "7.jpg",
"title": "图片7",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢7!",
"thumb": "http://gitphoto.qiniudn.com/7.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/7.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下7"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下7"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下7"
}
]
},
{
"id": "8.jpg",
"title": "图片8",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢8!",
"thumb": "http://gitphoto.qiniudn.com/8.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/8.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下8"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下8"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下8"
}
]
},
{
"id": "9.jpg",
"title": "图片9",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢9!",
"thumb": "http://gitphoto.qiniudn.com/9.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/9.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下9"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下9"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下9"
}
]
},
{
"id": "10.jpg",
"title": "图片10",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢10!",
"thumb": "http://gitphoto.qiniudn.com/10.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/10.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下10"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下10"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下10"
}
]
},
{
"id": "11.jpg",
"title": "图片1",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢1!",
"thumb": "http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/1.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下"
}
]
},
{
"id": "12.jpg",
"title": "图片2",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢2!",
"thumb": "http://gitphoto.qiniudn.com/2.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/2.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下2"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下2"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下2"
}
]
},
{
"id": "13.jpg",
"title": "图片3",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢3!",
"thumb": "http://gitphoto.qiniudn.com/3.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/3.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下3"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下3"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下3"
}
]
},
{
"id": "14.jpg",
"title": "图片4",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢4!",
"thumb": "http://gitphoto.qiniudn.com/4.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/4.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下4"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下4"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下4"
}
]
},
{
"id": "15.jpg",
"title": "图片5",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢5!",
"thumb": "http://gitphoto.qiniudn.com/5.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/5.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下5"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下5"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下5"
}
]
},
{
"id": "16.jpg",
"title": "图片6",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢6!",
"thumb": "http://gitphoto.qiniudn.com/6.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/6.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下6"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下6"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下6"
}
]
},
{
"id": "17.jpg",
"title": "图片7",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢7!",
"thumb": "http://gitphoto.qiniudn.com/7.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/7.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下7"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下7"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下7"
}
]
},
{
"id": "18.jpg",
"title": "图片8",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢8!",
"thumb": "http://gitphoto.qiniudn.com/8.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/8.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下8"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下8"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下8"
}
]
},
{
"id": "19.jpg",
"title": "图片9",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢9!",
"thumb": "http://gitphoto.qiniudn.com/9.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/9.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下9"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下9"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下9"
}
]
},
{
"id": "20.jpg",
"title": "图片10",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢10!",
"thumb": "http://gitphoto.qiniudn.com/10.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/10.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下10"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下10"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下10"
}
]
},
{
"id": "21.jpg",
"title": "图片1",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢1!",
"thumb": "http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/1.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下"
}
]
},
{
"id": "22.jpg",
"title": "图片2",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢2!",
"thumb": "http://gitphoto.qiniudn.com/2.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/2.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下2"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下2"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下2"
}
]
},
{
"id": "23.jpg",
"title": "图片3",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢3!",
"thumb": "http://gitphoto.qiniudn.com/3.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/3.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下3"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下3"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下3"
}
]
},
{
"id": "24.jpg",
"title": "图片4",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢4!",
"thumb": "http://gitphoto.qiniudn.com/4.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/4.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下4"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下4"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下4"
}
]
},
{
"id": "25.jpg",
"title": "图片5",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢5!",
"thumb": "http://gitphoto.qiniudn.com/5.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/5.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下5"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下5"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下5"
}
]
},
{
"id": "26.jpg",
"title": "图片6",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢6!",
"thumb": "http://gitphoto.qiniudn.com/6.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/6.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下6"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下6"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下6"
}
]
},
{
"id": "27.jpg",
"title": "图片7",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢7!",
"thumb": "http://gitphoto.qiniudn.com/7.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/7.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下7"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下7"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下7"
}
]
},
{
"id": "28.jpg",
"title": "图片8",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢8!",
"thumb": "http://gitphoto.qiniudn.com/8.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/8.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下8"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下8"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下8"
}
]
},
{
"id": "29.jpg",
"title": "图片9",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢9!",
"thumb": "http://gitphoto.qiniudn.com/9.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/9.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下9"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下9"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下9"
}
]
},
{
"id": "30.jpg",
"title": "图片10",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢10!",
"thumb": "http://gitphoto.qiniudn.com/10.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/10.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下10"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下10"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下10"
}
]
},
{
"id": "31.jpg",
"title": "图片1",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢1!",
"thumb": "http://gitphoto.qiniudn.com/1.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/1.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下"
}
]
},
{
"id": "32.jpg",
"title": "图片2",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢2!",
"thumb": "http://gitphoto.qiniudn.com/2.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/2.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下2"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下2"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下2"
}
]
},
{
"id": "33.jpg",
"title": "图片3",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢3!",
"thumb": "http://gitphoto.qiniudn.com/3.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/3.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下3"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下3"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下3"
}
]
},
{
"id": "34.jpg",
"title": "图片4",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢4!",
"thumb": "http://gitphoto.qiniudn.com/4.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/4.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下4"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下4"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下4"
}
]
},
{
"id": "35.jpg",
"title": "图片5",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢5!",
"thumb": "http://gitphoto.qiniudn.com/5.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/5.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下5"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下5"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下5"
}
]
},
{
"id": "36.jpg",
"title": "图片6",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢6!",
"thumb": "http://gitphoto.qiniudn.com/6.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/6.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下6"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下6"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下6"
}
]
},
{
"id": "37.jpg",
"title": "图片7",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢7!",
"thumb": "http://gitphoto.qiniudn.com/7.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/7.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下7"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下7"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下7"
}
]
},
{
"id": "38.jpg",
"title": "图片8",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢8!",
"thumb": "http://gitphoto.qiniudn.com/8.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/8.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下8"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下8"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下8"
}
]
},
{
"id": "39.jpg",
"title": "图片9",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢9!",
"thumb": "http://gitphoto.qiniudn.com/9.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/9.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下9"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下9"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下9"
}
]
},
{
"id": "40.jpg",
"title": "图片10",
"user": "M.J",
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"time": "2014-06-19",
"desc": "坑爹呢10!",
"thumb": "http://gitphoto.qiniudn.com/10.jpg?imageView/1/w/50/h/50",
"large": "http://gitphoto.qiniudn.com/10.jpg",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G",
"user": "小明",
"msg": "怒赞32下10"
},
{
"avatar": "http://0.gravatar.com/avatar/aa4393ddcb6d10984f53361d5e92694b?s=35&d=&r=G",
"user": "小李",
"msg": "怒赞64下10"
},
{
"avatar": "http://0.gravatar.com/avatar/8c8d9931e5d1ba7537982f65fea8d805?s=35&d=&r=G",
"user": "小小强",
"msg": "怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞怒赞128下10"
}
]
}
]
}

comment.json

{
"code": 1,
"msg": "成功或错误的提示信息",
"comment": [
{
"avatar": "http://0.gravatar.com/avatar/8a97a5bce9686c612fce48e1070a7b71?s=35&d=&r=G",
"user": "用户的名字",
"msg": "用户的留言内容"
}
]
}

api.php

<?php
if (PHP_VERSION < '5.0.0'){
header("Content-type: text/html;charset=utf-8");
exit('您的PHP版本过低本系统建议使用5.0.0以上版本');
}
error_reporting( 2 );

$msg = htmlspecialchars( $_POST['msg'] );
$pictureid = htmlspecialchars( $_POST['pictureid'] );

$JSON = array(
'code' => 1,
'msg' => '发送成功!',
'comment' => array(
array(
'avatar' => 'http://0.gravatar.com/avatar/cbbe656c7bb46772f589c9b18a7c747e?s=35&d=&r=G',
'user' => 'M.J',
'msg' => $msg
)
)
);

$result = json_encode( $JSON );
echo $result;
?>

运行结果如图:

jQuery实现QQ空间图片展示效果


jQuery实现QQ空间图片展示效果


jQuery实现QQ空间图片展示效果