由网友(の明明白白的我)分享简介:我需要一个JSON EN codeD响应返回到闪存HTTP GET请求。I need to return a JSON encoded response to a flash http get request.在ASP.NET中,我这样做是一个ASHX处理程序。什么是PHP相同呢?我的意思是为了我只得到JSON...
我需要一个JSON EN codeD响应返回到闪存HTTP GET请求。
I need to return a JSON encoded response to a flash http get request.
在ASP.NET中,我这样做是一个ASHX处理程序。 什么是PHP相同呢? 我的意思是为了我只得到JSON回来,而不是在< HTML>等等。
In ASP.NET, I do this with a ASHX handler. What's the PHP equivalent ? I mean in order that I only get JSON back, and not the <html> etc.
推荐答案
标题(内容类型:应用程序/ JSON');
http://php.net/manual/en/ function.json恩code.php
header('Content-type: application/json');
http://php.net/manual/en/function.json-encode.php
相关推荐
最新文章