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);
?>
$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 连接。 |
技术细节
| 返回值: | 返回带有下列属性的字符集对象:
|
|---|---|
| PHP 版本: | 5.1+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
The Art of Computer Programming, Volume 4, Fascicle 3
Donald E. Knuth / Addison-Wesley Professional / 2005-08-05 / USD 19.99
Finally, after a wait of more than thirty-five years, the first part of Volume 4 is at last ready for publication. Check out the boxed set that brings together Volumes 1 - 4A in one elegant case, and ......一起来看看 《The Art of Computer Programming, Volume 4, Fascicle 3》 这本书的介绍吧!