I need to return a JSON encoded response to a flash http get request.
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.
您应该将此放在脚本之上:
header('Content-Type: application/json; charset=utf-8');
header('Content-type: application/json');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.