codeigniter字符集编码问题

来自http://tunps.com/codeigniter-charset-ansi-or-utf-8

codeigniter里面的php文件都是ansi编码,其实我们在添加controller,model,view等php文件的时候,php文件的编码成了一个问题。其实这个关系不大。 如果真个项目采用utf-8,那么就将php文件的编码设置为utf-8 without bom,然后html模板文件meta写成:
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
mysql数据库统一字符集utf-8,校队:utf8_general_ci 就可以了,系统可以在“标准规范模式”正常浏览不出现乱码。 可能在后期处理上传的ms office文档的时候有转码的需要。

About tunpishuang

just 4 fun·····
This entry was posted in 未分类 and tagged . Bookmark the permalink.

One Response to codeigniter字符集编码问题

  1. haozhi says:

    “正常浏览不出现乱码。”
    但愿如此吧

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>