首页
留言板
统计
友链
更多
壁纸
Search
1
开个贴长期收录温柔语录
901 阅读
2
QRspeed - 词库 - txt
870 阅读
3
API接口源码 - 漂流瓶 - 我们漂流瓶联系!
615 阅读
4
答案之书 - API源码 - PHP
489 阅读
5
点歌API源码-PHP
458 阅读
默认分类
分享
PHP
API
QRspeed
MySQL
每日一图
表情包
老少皆宜
台词语录
chat快捷编写
真的不是水
你就说有没有用吧
真是我写的
登录
/
注册
Search
标签搜索
PHP
Linux教程
学习真好
Python
教程
chat
Hot
API源码分享
我爱学习
String
接口
源码
MySQL
表情包
小豆泥
语录
Linux
开源
不是独家
这真的不是水
独角兽
累计撰写
36
篇文章
累计收到
195
条评论
首页
栏目
默认分类
分享
PHP
API
QRspeed
MySQL
每日一图
表情包
老少皆宜
台词语录
chat快捷编写
真的不是水
你就说有没有用吧
真是我写的
页面
留言板
统计
友链
壁纸
搜索到
2
篇与
的结果
2021-09-01
PHP - Mb_String函数类
{mtitle title="简介"/}虽然许多语言每个必要字符都能一对一映射到 8 比特(bit)的值,但也有好几种语言需要非常多的字符来书面通讯,以至于它们的编码范围不能仅仅包含在一个字节里(一个字节 Byte 由 8 比特 bit 构成。每一比特仅能包含两种不同的值: 1 或 0。所以,一字节仅能够表示 256 种不同的值,即 2 的八次方)。 开发多字节字符编码方案是为了在基于字节的常规编码系统中表达超过 256 个字符。在你操作(trim、split、splice 等等)多字节编码的字符串的时候,由于在这种编码方案下,两个或多个连续字节可能只表达了一个字符,所以你需要使用专门的函数。 否则,当你将不能检测多字节字符串的函数应用到这个字符串的时候,它可能无法检测多字节字符的起始位置,并以乱码字符串结尾,基本丢失了它原来的意思。mbstring 提供了针对多字节字符串的函数,能够帮你处理 PHP 中的多字节编码。 除此以外,mbstring 还能在可能的字符编码之间相互进行编码转换。 为了方便起见,mbstring 设计成了处理基于 Unicode 的编码,类似 UTF-8、UCS-2 及诸多单字节的编码(在以下列出了)。{mtitle title="代码部分"/} mb_check_encoding — 检查字符串在指定的编码里是否有效 mb_chr — Get a specific character mb_convert_case — 对字符串进行大小写转换 mb_convert_encoding — 转换字符的编码 mb_convert_kana — Convert "kana" one from another ("zen-kaku", "han-kaku" and more) mb_convert_variables — 转换一个或多个变量的字符编码 mb_decode_mimeheader — 解码 MIME 头字段中的字符串 mb_decode_numericentity — 根据 HTML 数字字符串解码成字符 mb_detect_encoding — 检测字符的编码 mb_detect_order — 设置/获取 字符编码的检测顺序 mb_encode_mimeheader — 为 MIME 头编码字符串 mb_encode_numericentity — Encode character to HTML numeric string reference mb_encoding_aliases — Get aliases of a known encoding type mb_ereg_match — Regular expression match for multibyte string mb_ereg_replace_callback — Perform a regular expression search and replace with multibyte support using a callback mb_ereg_replace — Replace regular expression with multibyte support mb_ereg_search_getpos — Returns start point for next regular expression match mb_ereg_search_getregs — Retrieve the result from the last multibyte regular expression match mb_ereg_search_init — Setup string and regular expression for a multibyte regular expression match mb_ereg_search_pos — Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string mb_ereg_search_regs — Returns the matched part of a multibyte regular expression mb_ereg_search_setpos — Set start point of next regular expression match mb_ereg_search — Multibyte regular expression match for predefined multibyte string mb_ereg — Regular expression match with multibyte support mb_eregi_replace — Replace regular expression with multibyte support ignoring case mb_eregi — Regular expression match ignoring case with multibyte support mb_get_info — 获取 mbstring 的内部设置 mb_http_input — 检测 HTTP 输入字符编码 mb_http_output — 设置/获取 HTTP 输出字符编码 mb_internal_encoding — 设置/获取内部字符编码 mb_language — 设置/获取当前的语言 mb_list_encodings — 返回所有支持编码的数组 mb_ord — Get code point of character mb_output_handler — 在输出缓冲中转换字符编码的回调函数 mb_parse_str — 解析 GET/POST/COOKIE 数据并设置全局变量 mb_preferred_mime_name — 获取 MIME 字符串 mb_regex_encoding — Set/Get character encoding for multibyte regex mb_regex_set_options — Set/Get the default options for mbregex functions mb_scrub — Description mb_send_mail — 发送编码过的邮件 mb_split — 使用正则表达式分割多字节字符串 mb_strcut — 获取字符的一部分 mb_strimwidth — 获取按指定宽度截断的字符串 mb_stripos — 大小写不敏感地查找字符串在另一个字符串中首次出现的位置 mb_stristr — 大小写不敏感地查找字符串在另一个字符串里的首次出现 mb_strlen — 获取字符串的长度 mb_strpos — 查找字符串在另一个字符串中首次出现的位置 mb_strrchr — 查找指定字符在另一个字符串中最后一次的出现 mb_strrichr — 大小写不敏感地查找指定字符在另一个字符串中最后一次的出现 mb_strripos — 大小写不敏感地在字符串中查找一个字符串最后出现的位置 mb_strrpos — 查找字符串在一个字符串中最后出现的位置 mb_strstr — 查找字符串在另一个字符串里的首次出现 mb_strtolower — 使字符串小写 mb_strtoupper — 使字符串大写 mb_strwidth — 返回字符串的宽度 mb_substitute_character — 设置/获取替代字符 mb_substr_count — 统计字符串出现的次数 mb_substr — 获取部分字符串 {alert type="info"}本文内容转载于:https://www.php.net/manual/zh/intro.mbstring.php{/alert}
2021年09月01日
139 阅读
2 评论
3 点赞
2021-02-23
基础级foreach()的用法
函数说明--foreach()大部分用来历遍数组的(我是用来写接口的!)--foreach()用法 <?php header('Content-Type: text/html charset=utf-8');//设置header头防止中文乱码 $array = array("你","好","傻");//创建一个数组 foreach($array as $k=>$v){ echo $array[$k]; } ?>参数说明$array:我们在代码中用array()创建的数组as:将数组循环浏览相当于count($array)$k:在这里是数量也可以是键名(键名:{"code":"1"}code就是键名)$v:键名所对应的内容称之为键值
2021年02月23日
234 阅读
0 评论
0 点赞