Last active
September 28, 2015 16:20
-
-
Save NaokiStark/d465bc980d65de2902d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host=""; //rellenar | |
$port=""; //con datos | |
$user=""; //de conexion | |
$pass=""; //para | |
$db=""; //mysqli | |
if ($port != ""){ | |
$HostFull = $host . ":" . $port; | |
} | |
else | |
{ | |
$HostFull = $host; | |
} | |
$connection = @new mysqli($HostFull, $user, $pass, $db); | |
if($conection->connect_error){ | |
die("Error en la conexion : ".$connection->connect_errno."-".$connection->connect_error); | |
} | |
$connection->set_charset("utf-8"); //Para UTF-8 | |
//$connection es la variable de mysqli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment