简体   繁体   中英

running utf8 encoded php script with fastcgi

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM