fonction mysqli_init PHP ()
Exemples
fonction mysqli_init () est utilisée:
<?php
$con=mysqli_init();
if (!$con)
{
die("mysqli_init failed");
}
if (!mysqli_real_connect($con,"localhost","my_user","my_password","my_db"))
{
die("Connect Error: " . mysqli_connect_error());
}
mysqli_close($con);
?>
$con=mysqli_init();
if (!$con)
{
die("mysqli_init failed");
}
if (!mysqli_real_connect($con,"localhost","my_user","my_password","my_db"))
{
die("Connect Error: " . mysqli_connect_error());
}
mysqli_close($con);
?>
Définition et utilisation
mysqli_init () initialise MySQLi et retourne mysqli_real_connect () objet.
grammaire
mmysqli_init();
détails techniques
Retours: | Retourne un objet. |
---|---|
PHP version: | 5+ |
Manuel PHP Référence MySQLi