Windows10下phpstorm新建php文件,在浏览器打开出现乱码。。

2025-04-30 01:18:12
推荐回答(1个)
回答1:

有php输出的页要使用header函数声明编码
PHP开头加上如下代码
header("Content-Type:text/html; charset=UTF-8");
同时文件也要另存为utf-8格式~~GBK同理