PHP mysqli_get_charset() 函数

PHP 教程 · 2019-01-27 23:27:18

实例

返回带有属性的字符集对象:

<?php
$con=mysqli_connect("localhost","my_user","my_password","my_db");
// 检测连接
if (mysqli_connect_errno($con))
{
    echo "数据库连接失败: " . mysqli_connect_error();
}

var_dump(mysqli_get_charset($con));

mysqli_close($con);
?>

定义和用法

mysqli_get_charset() 函数返回字符集对象。

语法

mysqli_get_charset(connection);

参数 描述
connection 必需。规定要使用的 MySQL 连接。

技术细节

返回值: 返回带有下列属性的字符集对象:
  • charset - 字符集名称
  • collation - 排序规则名称
  • dir - 被获取的目录字符集或者 ""
  • min_length - 以字节计的最小字符长度
  • max_length - 以字节计的最大字符长度
  • number - 内部字符集数
  • state - 字符集状态
PHP 版本: 5.1+

点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Introduction to Linear Optimization

Introduction to Linear Optimization

Dimitris Bertsimas、John N. Tsitsiklis / Athena Scientific / 1997-02-01 / USD 89.00

"The true merit of this book, however, lies in its pedagogical qualities which are so impressive..." "Throughout the book, the authors make serious efforts to give geometric and intuitive explanations......一起来看看 《Introduction to Linear Optimization》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具