Because your project has less development experience,
Therefore, we will encounter many difficulties. Now we will record these difficulties to prevent further attacks.
1. When Zend studio is installed, you should set the text file encoding (text file encoding) to UTF-8,
This effectively prevents garbled characters.
The specific setting method is window-> preferences-> General-> workspace text file encoding.
Set the default encoding method to UTF-8.
When I write a project, I always make a mistake, that is, I write a lotCodeWhen you connect to the database to obtain the data in the database,
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/> is used to solve the problem,
However, if other Chinese information is displayed on the page, Chinese characters are garbled,
This is because the default encoding method of your project is GBK,
Right-click the project and choose Properties> set the coding method of the project to UTF-8. However, you have carefully read the code,
All text in the phtml file written by myself is garbled,
You have to modify them one by one,
So,
Remember to set the text file encoding mode to UTF-8 when installing Zend studio!