简体   繁体   English

从PHP和andriod studio编码时的Json对象img url问题

[英]Json object img url problem when encode from PHP and andriod studio

My json php encoded with a slash problem.我的 json php 用斜线问题编码。 When php encoded a web image address it shows slashes instead of normal slashes.当 php 编码一个网页图片地址时,它会显示斜杠而不是普通的斜杠。 This is what it shows when json php encoded the url of an image address.这是 json php 编码图像地址的 url 时显示的内容。

{"posts":[{"id":"326","img_url":"http:\ / \ /doman name.com\ /folder\ /images\ /name - Copy.jpg"},{"id":"325","img_url":"http:\ / \ /doman name.com\ /folder\/images\ /d.jpg"}]}

I finally found the problem after gotten some help from you guys about escape slashes.在从你们那里得到一些关于转义斜线的帮助后,我终于找到了问题。 Thank you.谢谢你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM