6 月21st
PHPをUTF-8で書いたときBOMに気をつけろ!
phpを何も気にせず、UTF-8で書いて
header()関数によりリダイレクト処理をしようとしたら、
Warning: Cannot modify header information - headers already sent by
が出てどうしても解決できない。。。
で色々調べたら検索したら、
[PHP-users 12223] bomつきutf-8ファイルでのheaderによるリダイレクト
要は、PHPで書くときはBOMなしの「UTF-8N」 にしろってことね。。
あぁーしらんかったぁ。。
おしえてよー
2時間ぐらいはまったよ。
About this entry
You’re currently reading “PHPをUTF-8で書いたときBOMに気をつけろ!,” an entry on Mj-site Blog
- Published:
- 06.21.07 / 7pm
- Category:
- PHP
3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]