


Detailed introduction to the steps of converting Dreamweaver GBK/GB2312 to UTF-8 encoding (site-wide modification method)
This article mainly introduces the steps of converting Dreamweaver GBK/GB2312 to utf-8 encoding (site-wide modification method). Friends who need it can refer to it
Currently, MIP has strict requirements for encoding, and it must be It is UTF-8, so for most users of GBK or GB2312, they can only convert the entire website encoding before performing MIP transformation, otherwise the transformed page will be a large garbled mess.
Why does MIP only support utf-8? At present, some mobile phone browsers only support UTF-8, and garbled characters will appear when opening GBK websites. Therefore, for the compatibility of mobile phones, MIP standardizes the encoding of web pages as UTF-8. At the same time, it is recommended that everyone try to use UTF-8 when making websites. Not only is it the mainstream international encoding, but the quality of the website will also be reduced. At the same time, this tutorial is applicable to cms of other PHP systems. The general principle is UTF-8 program replacement, template transcoding, and database transcoding. These three parts of the operation. The details are explained below.
★ TranscodingPreparation work——Back up the original GBK website
Before transcoding, we need to have some preparation work and Notes
First, back up the original website of GBK (GB2312). The steps are as follows:
First, use the background data backup function to back up the database, enter the background, and click , (or use Imperial Backup King)
System - System Settings - Database Backup/Restore The database form appears here,
Click "OK" here to perform database backup, according to the database size, backup time Different lengths.
Second, wait for the database backup to be completed, package all the files under the root directory of the website, and back up
to where the website data and database backup are completed.
The purpose of backing up the entire site is to prevent the entire site from being restored after transcoding failure.
The complete Dreamweaver website is divided into three parts, program, template, database, we will convert these three parts in turn code operation.
The principle of transcoding is
Use Imperial Data Backup King to transcode the database,
Use DreamWeaver UTF-8 program to directly replace the GBK program,
Use the webpage editor to transcode the template.
★ Transcoding work dismantling database transcoding
Database transcoding, I tested several methods and found that transcoding is the safest The complete way is to use the empire data backup
template download address www.php.cn/xiazai/code/dedecms. We get the
upload in the compressed package. You can change it to another name and put it in the website. For example, I changed it to shuju
and then put this directory under the website. The access address is domain name/shuju
. The default background admin password is 123456#.
##After logging in, a database setting appears. We need to enter and set the database address, database user, and database password used by the original website in sequence. (You may need to modify the default login password and randomverification code, modify it yourself)
Then click "Backup Data" under "Backup and Restore Database"will The database of your original website appears, click "Backup Data" behind the databaseThe page that appears at this time is very important but also very simple, just transcode hereTranscoding work dismantling program transcoding
Program transcodingThe general steps are, after completing the backup, keep the backup package, and then Clear the website space (only clear the data of the website space, Empire Data Backup King does not need to clean, you still need to use it to restore the data!), download the new UTF-8 program, and install, At this point, the transcoding work of the program part is completed.
Download and decompress, the files we get in uploads are the core files of the program,Upload to the website space
Detailed explanation of the installation steps. If you know how to install DreamWeaver, you can skip it here. Go directly to the next step of template transcoding.
Step 1, run your domain name/install/index.php
Step 2, check, I have read and agree to this agreement, Click to continue
Step 3. If Continue appears below, click Continue to the next step. As for the red cross, you generally don’t need to worry about it. If Continue does not appear, it means you need space. If there is a problem, please find the cause of the space yourself.
Step 4, this is the most important part. According to the picture above, we basically don’t need to choose anything when selecting the template. Let’s start the second part, database settings, here It involves several concepts: "database host", "database name", "database user", "database password", "data table prefix", and "database encoding". Please fill in the information completely against the space provider or the database information you created.
The third block is the administrator account and password. Fill it in by yourself.
The fourth block is the website settings. Change the website name to your own. Generally, you don’t need to change anything else, especially Try not to change the Cookie Encryption code. Others can be changed in the background.
Do not check the initialization data to experience it. Just click Continue and the installation is complete!
I attach my installation parameters for everyone to take a look at.
The following interface appears to prove that you have successfully installed it
Transcoding part of the program That’s it. At this point, we get a blank UTF-8 DreamWeaver website.
★ Transcoding work dismantling template transcoding
Please be sure to use professional web page editing software to perform this step!
I recommend that you use dreamweaver or Notepad+. Of course, there are also small tools on the Internet for template batch GBK transcoding utf-8. Cannot be changed using Notepad! The front end can skip the template transcoding tutorial.
First of all, we need to separate our template files from the backed up website data. Among them are program template files, which are usually in a folder under the templates folder in the root directory of the website, as well as css and js file, you need to find it yourself, replace and transcode it. Since the template file and the style file are different, I only use Dreamweaver to replace a web page for demonstration. In fact, the front-end laughed when I saw this. This is really nonsense. ……
Open one of the template files with dreamweaver.
Click Modify - Page Properties - Title/Encoding - Encoding, and what should appear at this time is as shown in the figure
We will Select Simplified Chinese (GB2312) as Unicode (UTF-8),
and click OK. The template file will be successful. Follow this method to extract all Template file for transcoding. After the transcoding is completed, upload it to the corresponding location of the newly installed UTF-8 website.
★ End of the transcoding work—restoring the website
At this point, the database is transcoded but not restored, the program is transcoded but the data is blank, and the template is transcoded
At this time, use the Imperial Data Backup King to restore the database.
The following steps are to log in to the domain name/shuju
Click on the restore data under "Backup and Restore Database" and select the data The source directory is the directory where the database was backed up just now. Next, select the data table (that is, the original website data table) in "Database to be imported" and click to start recovery.
After recovery, the original GBK database will be transcoded into utf8.
Here, our website is completely transcoded from GBK to utf-8, and MIP can be transformed.
★ Notes on transcoding
1. If the program has been modified or re-developed, transcoding is not recommended
2. Transcoding Then log in to the backend, click System Settings-Basic System Parameters, click OK in Site Settings
3. If there is an error in the generation or template, click Generate-Automatic Task-UpdateSystemCache
4. Try to use the Dreamweaver template tag The most compatible template tag
The transcoding process of DreamWeaver can also be applied to other PHP CMS systems for transcoding.
If you have any questions, please reply to the post for discussion, and I will spare no effort to correct it...because I am the one who fixes the cards...
The above is the detailed content of Detailed introduction to the steps of converting Dreamweaver GBK/GB2312 to UTF-8 encoding (site-wide modification method). For more information, please follow other related articles on the PHP Chinese website!

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools