Remember to change all pages, otherwise INCULDE specifically to include the utf8 sentence. Of course, if the modification is not completed, Chinese will not be displayed, only GBK text will be displayed.
<?php //Declare variable $shouji $shouji = 'Sell a kidney for an iPhone'; //Put $shouji in double quotes and then echo what is the effect? ? $str = "Will $shouji be displayed?"; //Enter $str to try echo $str; ?>
reply<?php
header('content-type:text/html;charset=utf-8');
//声明变量$shouji
$shouji = '为了苹果手机去卖肾';
//在双引号中放$shouji 然后echo 一下是什么效果呢?
$str = "$shouji 会不会显示呢?";
//输入$str试试
echo $str;
?>
Add a header in front of the code to define the HTML. Just enter the encoding. You can try it.
Remember to change all pages, otherwise INCULDE specifically to include the utf8 sentence. Of course, if the modification is not completed, Chinese will not be displayed, only GBK text will be displayed.
header('content-type:text/html;charset=utf-8');
<?php
//Declare variable $shouji
$shouji = 'Sell a kidney for an iPhone';
//Put $shouji in double quotes and then echo what is the effect? ?
$str = "Will $shouji be displayed?";
//Enter $str to try
echo $str;
?>