PHP mysqli_connect_error() 函数

PHP 教程 · 2019-01-27 18:11:48

实例

返回上一次连接错误的错误描述:

<?php
$con
=mysqli_connect("localhost","wrong_user","my_password","my_db");
// 检查连接
if (!$con)
{
    die(
"连接错误: " mysqli_connect_error();
}
?>

定义和用法

mysqli_connect_error() 函数返回上一次连接错误的错误描述。

语法

mysqli_connect_error();

技术细节

返回值: 返回一个描述错误的字符串。如果没有错误发生则返回 NULL。
PHP 版本: 5+

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

查看所有标签

Using Google App Engine

Using Google App Engine

Charles Severance / O'Reilly Media / 2009-5-23 / USD 29.99

With this book, you can build exciting, scalable web applications quickly and confidently, using Google App Engine - even if you have little or no experience in programming or web development. App Eng......一起来看看 《Using Google App Engine》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码