Solution to Browser Prompt Content Encoding Error

When moving a website, you should pay attention to the website coding, especially if you switch from a Win host to a Linux host like my personal blog. In this case, you should pay special attention to the compatibility of php. The last time we moved Xunxiaoshan Blog from Hong Kong Space to China, we uploaded the database and website programs to the domestic space according to the normal transfer steps. After the binding is completed, the home page can be opened, but 404 pages will appear on other pages.

 Browser encoding error

I think it must be a fixed link problem, because when the Windows host is set to pseudo static, an httpd file is uploaded to the website, which should be the reason why Linux generates. htaccess files by default. Then, directly delete the httpd.ini file through the online control panel, and open it again to find that it can be browsed normally. I think this is the end. However, this is not the case. A friend of mine said that he could not open it and said, "The content encoding is wrong, and the page you are trying to view cannot be displayed because it uses an invalid or unsupported compression format.". Web page codes include UTF8, GBK, GB2312, and so on. GBK, GB2312, and UTF8 can only be converted to each other through Unicode encoding. However, I think there is something wrong in the following operation that causes coding errors. It is because the configuration file was opened in txt format when using the online control panel of the Web page, which causes coding errors.

How to solve coding errors? I solved this problem by opening index.php through the ftp client and finding that there is indeed garbled code, so I deleted it, downloaded the index file of this version, remember to open it with dreamweaver and other related software, configure the database user name and password and upload them, and then it can be opened. But what I want to say here is that my website is encoded incorrectly because I modified the index file in txt format in the control panel. If your web site opens and the browser also prompts that the content is encoded incorrectly, you should first think about the process that caused the garbled code, find the garbled file and then modify it.

The above is how to solve the problem of website content coding errors. We need to understand this problem clearly. In the FTP client, you can edit website files online in the txt format, but when you edit online in the online control panel provided by the host company, it is easy to cause website coding errors by modifying files in the txt format, which is worth noting.

 blank

About the author: Look for a hill

People from Jiujiang, Jiangxi, focus on new media, search engines, e-commerce operations, IT technology, and software skills!

Post reply

Your email address will not be disclosed. Required items have been used * tagging

4 comments