Home>Article>Backend Development> php run file garbled characters
Setting the following three character sets to be consistent can solve the problem of garbled characters after running the php file.
1. Character set of PHP editor
Taking Zend Studio as the editor of PHP program as an example, create a project , set the character set to "UTF-8".
2. The predefined character set used by the web page
Before the .php file or .html file to be run, add the predefined character set of the web page. Definition statement:
3. Browser to view the character set of the web page
Take the firefox browser as an example. After the first and second settings are completed, run .php program, if garbled characters still appear, click the browser option bar > View > Change encoding > UTF-8.
Recommended tutorial:PHP video tutorial
The above is the detailed content of php run file garbled characters. For more information, please follow other related articles on the PHP Chinese website!