dongzhang1875 2011-06-05 23:32
浏览 110
已采纳

用fastcgi运行utf8编码的php脚本

I have installed Nginx and I used fastcgi to run php script.

When I run php script encoded as "utf8" I have got an error about "header":

FastCGI sent in stderr: "PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/myScript.php:1) in /xxx/myScript.php on line 29....

If I encode the same script in "ascii", I have not this error.

I have a lot of scripts and some of them are in utf8.

Does anybody know how to run utf8 script with fastcgi?

  • 写回答

1条回答 默认 最新

  • dtftao7249656 2011-06-05 23:34
    关注

    Configure your editor to store UTF-8 files without BOM. Open your file in an hexeditor to see the BOM to confirm, as in normal editors you won't see it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统