1.Accept belongs to the request header, and Content-Type belongs to the entity header.
Http headers are divided into general headers, request headers, response headers and entity headers.
The http header structure of the requester: Universal header|Request header|Entity header
The HTTP header structure of the responder: Universal header|Response header|Entity header
2.Accept represents the data type that the sender (client) wants to accept.
For example: Accept: text/xml;
Represents that the data type that the client wants to accept is xml type
Content-Type represents the data type of entity data sent by the sender (client|server).
For example: Content-Type: text/html;
It means the data format sent by the sender is html.
The combination of the two,
Accept:text/xml;
Content-Type:text/html
means that the data type you want to accept is xml format, and the data format of the data sent in this request is html.
The above introduces the difference between PHP knowledge point 3-HTTP header-Accept and Content-Type, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.