php解决乱码问题时,出现Cannot modify header information问题的解决方法 设置页面编码使用: header("Content-Type:text/html;charset=utf-8"); 会出现:Cannot modify header information 解决方法: 找到php.ini 这个配置文件,然后查找一项:output_buffering将其值由原来的off改为on,重新启动Apache就ok了。