集成PhalApi_Api后,返回的数据中文乱码

{"ret":200,"data":{"title":"Hello World!","content":"cpmtemt","test":"234","info":[{"id":"2147483647","name":"%E6%96%B0%E8%8F%9C%E8%B0%B1","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fnew_cook_menu_img.png"},{"id":"2147483647","name":"%E5%A6%88%E5%A6%88%E6%B4%BE","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fmom_pie_img.png"},{"id":"2147483647","name":"%E7%83%98%E5%9F%B9","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fcake_img.png"},{"id":"2147483647","name":"%E8%8F%9C%E5%8D%95","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fcook_menu_img.png"},{"id":"2147483647","name":"%E5%AE%B6%E5%B8%B8%E8%8F%9C","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fhome_cook_img.png"},{"id":"2147483647","name":"%E7%83%AD%E8%8F%9C","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fhot_cook_img.png"},{"id":"2147483647","name":"%E5%81%A5%E5%BA%B7","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fhealthy_food_img.png"},{"id":"2147483647","name":"%E5%87%89%E8%8F%9C","img_path":"http%3A%2F%2F127.0.0.1%2FPhalApi%2FCookBookPhpService%2FPic%2Fmain_menu_icon%2Fcold_dishes_img.png"}]},"msg":""
已邀请:

dogstar - PhalApi创始人

赞同来自: 农鲜哥

数据库编码、表编码、表字段编码、PHP执行时设置的编码、PHP文件的编码、程序处理的编码、返回结果的编码,以上这一些的编码都应该保持一致。可逐个检测

农鲜哥

赞同来自:

PlalApi的输出都在头部有定义是按UTF-8,是不是你代码的编码格式有问题。

要回复问题请先登录注册