In php echo and header (content-type: texthtml; charsetuft-8); why can't they be used together? In php, add the header ("content-type: text/html; charset = uft-8"); in this sentence, the android client does not receive the data sent to the android client with echo; if the above statement is removed to handle garbled text, what is garbled text received by the android client? Can you give me some advice? It is best to provide more details. thank you for your help.
Reply to discussion (solution)
Garbled issues include file encoding, file content encoding, transmission encoding ......
The file encoding is used when the file is created,
Content encoding is header ("content-type: text/html; charset = uft-8 ");
Transmission encoding, such as url encoding ......
In case of garbled code, all the codes that can be thought of are unified: utf8
In addition, header ("content-type: text/html; charset = uft-8 ");
The first sentence to be put in the file.
Thank you for choosing the first floor. this is very important for new users. please pay attention to it! I spent a lot of time on it.