In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces php how to query the coding of variables, the article is very detailed, has a certain reference value, interested friends must read it!
In PHP, you can query the encoding of variables through the mb_detect_encoding function, which detects the encoding of characters, and its syntax is "mb_detect_encoding (string $str, mixed $encoding_list...)".
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
Mb_detect_encoding
(PHP 4 > = 4.0.6, PHP 5, PHP 7, PHP 8)
Mb_detect_encoding-detect the encoding of characters
Description
Mb_detect_encoding (string $str, mixed $encoding_list = mb_detect_order (), bool $strict = false): string
Detects the encoding of the string str.
Parameters.
Str
The string to be checked.
Encoding_list
Encoding_list is a list of character encodings. The encoding order can be specified by an array or a comma-separated list string.
If encoding_list is omitted, detect_order will be used.
Strict
Strict specifies whether to strictly detect the encoding. The default is false.
Return value
Returns false when the character encoding is detected or the encoding of the specified string cannot be detected.
Example
Example # 1 mb_detect_encoding () example
See also
Mb_detect_order ()-sets / gets the detection order of character encodings
The above is all the contents of the article "how to query the Encoding of variables in php". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.