Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the garbled code of php command line output

Shulou Source: shulou.com Published: 2022-06-03 10:37:56 11月15日 Update

Php command line output garbled how to solve, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Php command line output garbled solution: 1, in the php code to add "header (" content-type:text/html;charset=gbk ");"; 2, set the command line font.

This article operating environment: Windows7 system, PHP7.1 version, Dell G3 computer

Php command line output garbled how to do?

Garbled handling of Chinese characters output from php Command Line under window

1. Add to the code of php

Header ("content-type:text/html;charset=gbk")

two。 Set the font of the command line

On the command line, right-click the attribute font and select the following font. Click OK.

I basically solved the problem according to the above process, and if there is any garbled code, see if the code is not gbk and try gb2312 and other codes.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Commands garbled output fonts codes codes Chinese plus help clarity content methods this attributes what to do articles novices more processes environments computers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology MariaDB NVidia Linux