Search
 
SCRIPT & CODE EXAMPLE
 

PHP

tipo de conexiones a la base de datos en php

<?php
$mysqli = new mysqli("localhost", "usuario", "contraseña", "basedatos");
if ($mysqli->connect_errno) {
    echo "Fallo al conectar a MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
echo $mysqli->host_info . "
";

$mysqli = new mysqli("127.0.0.1", "usuario", "contraseña", "basedatos", 3306);
if ($mysqli->connect_errno) {
    echo "Fallo al conectar a MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}

echo $mysqli->host_info . "
";
?>
Comment

PREVIOUS NEXT
Code Example
Php :: wpdb-prepare 
Php :: wp wordpress logout 
Php :: General error: 1709 Index column size too large. The maximum column size is 767 bytes. 
Php :: method put laravel 
Php :: php carbon from timestamp 
Php :: php two decimal places 
Php :: laravel instal 
Php :: wp get acf category in post 
Php :: php mess detector 
Php :: php remove prefix from string 
Php :: password strength php 
Php :: server error in laravel 
Php :: php echo 
Php :: how send parameter with command in laravel 
Php :: centos update php 7 to php 8 
Php :: How to pass JavaScript variables to PHP? 
Php :: update pdo mysql php 
Php :: php mysqli connect err0r 
Php :: mysqli real escape string php 
Php :: php unset array element 
Php :: laravel get current action name 
Php :: Failed to authenticate on SMTP server with username 
Php :: PHP Numeric String 
Php :: laravel routing controller get and post method 
Php :: php trim string if longer than 
Php :: yii app db createcommand join yii1 
Php :: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://vtl-lab.com/VN/crecc-cms/api/member/register.json. (Reason: CORS request did not succeed). 
Php :: laravel artisan cache clear 
Php :: laravel in array blade 
Php :: get single column value in laravel eloquent 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =