I just started learning PHP, configured apache2.4 php7, and wrote a few lines with Notepad
<?PHP
echo "Welcome to PHP!";
?>
When opened with IE and Google, Chinese characters are displayed as garbled characters. . . I haven't been able to find the answer for a whole day. . Seeking experts. .
Need to add at the top of the PHP file: header('Content-type:text/html;charset=utf-8');
Try adding a sentence before the output: header("Content-type:text/html;charset=utf-8");