While writing a form submission project, I encountered that the PHP interface output could not display the Chinese interface.
Later, I checked the relevant information and came up with a solution.
The code is as follows:
<title>123</title> <?php header('content-type:text/html;charset=utf-8'); echo "<h2>PHP 很有趣!"; echo "Hello world!<br>"; echo "我计划学习 PHP!<br>"; echo "这段话", "由", "多个", "字符串", "串接而成。"; ?>
Open the php code as a text file. When saving as, select the encoding methodutf-8
Open it on the server and it will display Chinese
The above has introduced the Chinese garbled characters displayed on the PHP interface, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.