Solution to the garbled script in php: 1. When saving the written php file, save it as ANSI encoding; 2. Set "charset="gb2312"" in the header of the php file; 3. Set "charset="utf-8"" where the js file is included.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
What should I do if the script in php is garbled?
Completely solve the Chinese garbled problem caused by js included in php
Today, when writing the login module of php, the js file was included in the php file for login. Basic standard detection, but when previewing in the browser, garbled characters appeared (there is a setting in the head ;), I checked the information online and added