Home >Backend Development >PHP Problem >What should I do if php is garbled when opened with dw?
php is garbled when opened with dw because the file does not specify the code of the current document encoding separately. The solution is: 1. Open the dreamweaver software; 2. Find the "Preferred Parameters" and select the document encoding; 3. Save After setting, just reopen the file.
The operating environment of this tutorial: windows7 system, dreamweaverCC 2021&&php8.1 version, Dell G3 computer.
What should I do if php is garbled when opened with dw?
Solution to the problem that the Chinese code of PHP in DW displays garbled characters:
This happens because there is no code that separately indicates the current document encoding in the file. Do not modify this file and close it first. it.
Then go to the menu:
Edit
->
Preferred Parameters
->
New Document
->
Select the original encoding of your document in the default encoding, such as gb2312 or utf-8. After saving the settings, open the file again. If the encoding is consistent,
garbled characters
will not appear.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What should I do if php is garbled when opened with dw?. For more information, please follow other related articles on the PHP Chinese website!