02-problems encountered during project development: webpage garbled

Source: Internet
Author: User

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,


Remember to set the text file encoding mode to UTF-8 when installing Zend studio!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.