本文作者:DurkBlue

Warning: Cannot modify header information - headers already sent by

Warning: Cannot modify header information - headers already sent by 摘要:    Warning: Cannot modify header information - headers already sent by (output s...

   Warning: Cannot modify header information - headers already sent by (output started at


出这个错误是因为 header('Content-Type:text/html;charset= UTF-8'); 代码之前有输出或者header();函数前面有输出内容就会提示这个错误。

可以直接把这段代码放在页面文件的最前面,即可。

如果有要设置字符集可以用 echo '<meta charset="UTF-8">'; 代替,

如果要header("location:index.php"); 跳转 ,直接用echo '<script>window.location.href='index.php'</script>'; 一样的效果。


此篇文章由DurkBlue博客申请发布,转载吧请注明来处
文章投稿或转载声明

来源:DurkBlue版权归原作者所有,转载请保留出处。本站文章发布于 2019-12-27
温馨提示:文章内容系作者个人观点,不代表DurkBlue博客对其观点赞同或支持。

赞(0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

阅读
分享

发表评论取消回复

快捷回复:
AddoilApplauseBadlaughBombCoffeeFabulousFacepalmFecesFrownHeyhaInsidiousKeepFightingNoProbPigHeadShockedSinistersmileSlapSocialSweatTolaughWatermelonWittyWowYeahYellowdog

评论列表 (暂无评论,1663人围观)参与讨论

还没有评论,来说两句吧...