PHP Classes

File: Conn.Config.php

Recommend this page to a friend!
  Classes of Ruben Crespo   CSV Importer   Conn.Config.php   Download  
File: Conn.Config.php
Role: Configuration script
Content type: text/plain
Description: Example´s Connection Config File
Class: CSV Importer
Import data from a CSV file into a MySQL table
Author: By
Last change:
Date: 16 years ago
Size: 568 bytes
 

Contents

Class file image Download
<?php

/* ****************************************************
* Contiene los datos de acceso necesarios para
* realizar la conexión con la base de datos indicada
* contenida en un host determinado
**************************************************** */

function conexion()
{
$host="Localhost"; //For Example ...
$user="yourUserName";
$pass="yourPassword";
$database="yourDatabase";

$cnx=mysql_connect($host, $user, $pass);
mysql_connect($host, $user, $pass);
echo (
mysql_error($cnx));

mysql_select_db($database, $cnx);
echo (
mysql_error($cnx));

return
$cnx;
}

?>