PHP content type JSON response कैसे set करते हैं? के सही और गलत approach में क्या फर्क है?

Other Published Updated 0 Views Verified
PHP content type JSON response कैसे set करते हैं? के सही और गलत approach में क्या फर्क है? सही विकल्प चुनें और code/solution को समझें।
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified

response.header.json();

response.header.json();
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Sarkari Resultess
Editorial Answer 1
Verified Correct Answer

header('Content-Type: application/json');

header('Content-Type: application/json');
Additional Explanation
Content-Type response header client को representation type बताता है।
Sarkari Resultess
Editorial Answer 2
Verified

header.json();

header.json();
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Sarkari Resultess
Editorial Answer 3
Verified

content_type('json');

content_type('json');
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Sarkari Resultess
Editorial Answer 4