- json_decode: documentation ( source)
- print_r: documentation ( source)
<?php
$json = '{
"jianmo:home_top_banner":
{
"title": "简约风格主题:首页顶部.轮播图 ",
"category": "jianmo",
"templateName": "@theme/jianmo/block/carousel.template.html.twig",
"items": {
"posters":{
"title":"海报",
"desc":"首页海报",
"count":1,
"type":"poster",
"default":[
{
"src" : "\/themes\/jianmo\/img\/banner_net.jpg",
"alt" : "海报1",
"layout" : "limitWide",
"background" : "#3ec768",
"href" : "",
"html" : "",
"status" : "1",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_app.jpg",
"alt" : "海报2",
"layout" : "limitWide",
"background" : "#0984f7",
"href" : "",
"html" : "",
"status" : "1",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_eweek.jpg",
"alt" : "海报3",
"layout" : "limitWide",
"background" : "#3b4250",
"href" : "",
"html" : "",
"status" : "1",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_net.jpg",
"alt" : "海报4",
"layout" : "limitWide",
"background" : "#3ec768",
"href" : "",
"html" : "",
"status" : "0",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_net.jpg",
"alt" : "海报5",
"layout" : "limitWide",
"background" : "#3ec768",
"href" : "",
"html" : "",
"status" : "0",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_net.jpg",
"alt" : "海报6",
"layout" : "limitWide",
"background" : "#3ec768",
"href" : "",
"html" : "",
"status" : "0",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_net.jpg",
"alt" : "海报7",
"layout" : "limitWide",
"background" : "#3ec768",
"href" : "",
"html" : "",
"status" : "0",
"mode" : "img"
},
{
"src" : "\/themes\/jianmo\/img\/banner_net.jpg",
"alt" : "海报8",
"layout" : "limitWide",
"background" : "#3ec768",
"href" : "",
"html" : "",
"status" : "0",
"mode" : "img"
}
]
}
}
},
"jianmo:middle_banner":
{
"title": "简约风格主题:首页中部.横幅",
"category": "jianmo",
"templateName": "@theme/jianmo/block/middle_banner.template.html.twig",
"items": {
"icon1":
{
"title": "中部图标1",
"desc": "建议图片大小为130*130",
"count": 1,
"type": "imglink",
"default": [
{
"src": "\/assets\/v2\/img\/icon_introduction_1.png",
"alt": "中部横幅",
"href": "#",
"target": "_blank"
}
]
},
"icon1title": {
"title": "图标1标题",
"desc": "",
"count": 1,
"type": "text",
"default":[
{
"value": "网校功能强大"
}
]
},
"icon1introduction": {
"title": "图标1介绍",
"desc": "",
"count": 1,
"type": "textarea",
"default":[
{
"value": "一万多家网校共同选择,值得信赖"
}
]
},
"icon2":
{
"title": "中部图标2",
"desc": "建议图片大小为130*130",
"count": 1,
"type": "imglink",
"default": [
{
"src": "\/assets\/v2\/img\/icon_introduction_2.png",
"alt": "中部横幅",
"href": "#",
"target": "_blank"
}
]
},
"icon2title": {
"title": "图标2标题",
"desc": "",
"count": 1,
"type": "text",
"default":[
{
"value": "响应式页面技术"
}
]
},
"icon2introduction": {
"title": "图标2介绍",
"desc": "",
"count": 1,
"type": "textarea",
"default":[
{
"value": "采用响应式技术,完美适配任意终端"
}
]
},
"icon3":
{
"title": "中部图标3",
"desc": "建议图片大小为130*130",
"count": 1,
"type": "imglink",
"default": [
{
"src": "\/assets\/v2\/img\/icon_introduction_3.png",
"alt": "中部横幅",
"href": "#",
"target": "_blank"
}
]
},
"icon3title": {
"title": "图标3标题",
"desc": "",
"count": 1,
"type": "text",
"default":[
{
"value": "教育云服务支持"
}
]
},
"icon3introduction": {
"title": "图标3介绍",
"desc": "",
"count": 1,
"type": "textarea",
"default":[
{
"value": "强力教育云支持,免除你的后顾之忧"
}
]
}
}
},
"jianmo:advertisement_banner":
{
"title": "简约风格主题:中部广告",
"category": "jianmo",
"templateName": "@theme/jianmo/block/advertisement_banner.template.html.twig",
"items": {
"middleImg": {
"title": "广告图片",
"desc": "建议图片大小为宽1920px高 400px",
"count": "1",
"type": "imglink",
"default": [
{
"src": "\/themes\/jianmo\/img\/banner_poster.jpg",
"alt": "图片1的描述",
"href": "#",
"target": "_blank"
}
]
},
"middleBackground": {
"title": "背景填充色",
"desc": "填写颜色值,例如#ffffff",
"count": "1",
"type": "text",
"default": [
{
"value": "#e2133a"
}
]
}
}
},
"jianmo:bottom_info":
{
"title": "简约风格主题: 首页底部.链接区域",
"category": "jianmo",
"templateName": "@theme/jianmo/block/bottom_info.template.html.twig",
"items": {
"firstColumnText": {
"title": "第1列链接标题",
"desc": "",
"count": 1,
"type": "text",
"default": [
{
"value": "我是学生"
}
]
},
"firstColumnLinks": {
"title": "第1列链接",
"desc": "",
"count": 5,
"type": "link",
"default": [
{
"value": "如何注册",
"href": "",
"target": "_blank"
},
{
"value": "如何学习",
"href": "",
"target": "_blank"
},
{
"value": "如何互动",
"href": "",
"target": "_blank"
}
]
},
"secondColumnText": {
"title": "第2列链接标题",
"desc": "",
"count": 1,
"type": "text",
"default": [
{
"value": "我是老师"
}
]
},
"secondColumnLinks": {
"title": "第2列链接",
"desc": "",
"count": 5,
"type": "link",
"default": [
{
"value": "发布课程",
"href": "",
"target": "_blank"
},
{
"value": "使用题库",
"href": "",
"target": "_blank"
},
{
"value": "教学资料库",
"href": "",
"target": "_blank"
}
]
},
"thirdColumnText": {
"title": "第3列链接标题",
"desc": "",
"count": 1,
"type": "text",
"default": [
{
"value": "我是管理员"
}
]
},
"thirdColumnLinks": {
"title": "第3列链接",
"desc": "",
"count": 5,
"type": "link",
"default": [
{
"value": "系统设置",
"href": "",
"target": "_blank"
},
{
"value": "课程设置",
"href": "",
"target": "_blank"
},
{
"value": "用户管理",
"href": "",
"target": "_blank"
}
]
},
"fourthColumnText": {
"title": "第4列链接标题",
"desc": "",
"count": 1,
"type": "text",
"default": [
{
"value": "商业应用"
}
]
},
"fourthColumnLinks": {
"title": "第4列链接标题",
"desc": "",
"count": 5,
"type": "link",
"default": [
{
"value": "会员专区",
"href": "",
"target": "_blank"
},
{
"value": "题库增强版",
"href": "",
"target": "_blank"
},
{
"value": "用户导入导出",
"href": "",
"target": "_blank"
}
]
},
"fifthColumnText": {
"title": "第5列链接标题",
"desc": "",
"count": 1,
"type": "text",
"default": [
{
"value": "关于我们"
}
]
},
"fifthColumnLinks": {
"title": "第5列链接标题",
"desc": "",
"count": 5,
"type": "link",
"default": [
{
"value": "奇网校官网",
"href": "http:\/\/www.qiwangxiao.com\/",
"target": "_blank"
},
{
"value": "官方微博",
"href": "",
"target": "_blank"
},
{
"value": "加入我们",
"href": "",
"target": "_blank"
}
]
},
"bottomLogo": {
"title": "底部Logo",
"desc": "建议图片大小为233*64",
"count": 1,
"type": "imglink",
"default": [
{
"src": "\/assets\/v2\/img\/bottom_logo.png",
"alt": "建议图片大小为233*64",
"href": "http:\/\/www.qiwangxiao.com",
"target": "_blank"
}
]
},
"weibo": {
"title": "底部微博链接",
"desc": "填入网校的微博首页地址",
"count": 1,
"type": "link",
"default": [
{
"value": "微博首页",
"href": "",
"target": "_blank"
}
]
},
"weixin": {
"title": "底部微信公众号",
"desc": "上传网校的微信公众号的二维码",
"count": 1,
"type": "img",
"default": [
{
"src": "",
"alt": "微信公众号"
}
]
}
}
}
}';
print_r(json_decode($json));