Summary of the problem with zend studio

  • 2020-06-15 07:57:28
  • OfStack

There are about four places where the code is messy:

1, the encoding of the file (that is, the code of your new file), this point needs to set the encoding of the editor.

2. The page does not specify the display mode of browser code. The solution for this point is:
1, if the page is.html < meta http - equiv = "Content - Type" content = "text/html; charset = utf8 "/ > .
2 For x. php file, add header(" ES22en-ES23en :text/html; charset=utf-8"). This basically tells the browser that I want the encoding of utf-8 to display the page.

3. Specify the code of the database when creating a new database, and add mysql_query("set names utf8") when linking the database; Specifies that the encoding of the information output from the database is utf-8.

4. In ajax, you need to specify the encoding of the receiving page to the receiving data. Use the function iconv ().

In summary: all codes are unified 1. Whether the code is ES43en-8 or gbk, etc.

Related articles: