APache2.4 PHP7.0 win10 Home Edition
After setting up the environment, hello PHP can be displayed as shown below
But when the following program is executed
<HTML> <HEAD> <TITLE> </TITLE> </HEAD> <BODY> <?php $room = 20; function showrooms(){ echo $room; } showrooms(); echo $room.'间房间。'; ?> </BODY> <HTML>
This kind of garbled code appears
Please give some advice!
老实小胖2018-03-06 21:00:12
It has been solved, thank you for your help! Just change it to UTF8 in the encoding options of notepad
662018-03-06 16:45:11
Encoding problem, check whether the encoding of your editor is consistent with the encoding of the browser
老实小胖2018-03-05 22:15:07
grateful! But I tried it, but it still didn’t work.
Source code of the web page:
辉2018-03-05 21:50:00
Add this paragraph to <head></head>
<meta charset="UTF-8">
The default character set problem of the browser system.