PHP Classes

File: examples/mysql_connection.php

Recommend this page to a friend!
  Classes of Everton da Rosa  >  XtPHP  >  examples/mysql_connection.php  >  Download  
File: examples/mysql_connection.php
Role: Example script
Content type: text/plain
Description: Example script
Class: XtPHP
General purpose library of utility classes
Author: By
Last change:
Date: 8 years ago
Size: 288 bytes
 

Contents

Class file image Download
<?php

//Exemplo de conexão com um servidor Mysql
error_reporting(0);

$xterror;

require
'../mysql.php';
require
'../error.php';

if(
XtMysql::connect('localhost', 'user', 'password', 'xtexample'))
{
    echo
"<p>Conexão realizada com sucesso!</p>";
}
else
{
    echo
$ERROR[$xterror];
}

?>