1
0
Fork 0

Creacion de funciones de correccion en un archivo independiente conex.php

This commit is contained in:
humano 2015-07-11 09:50:39 -05:00
parent 5b39f5ec7c
commit 44bef84232
1 changed files with 29 additions and 0 deletions

29
milfs/funciones/conex.php Normal file
View File

@ -0,0 +1,29 @@
<?php
function Conectarse(){
if ( !isset ( $link ) ) {
include("includes/datos.php");
if(!isset($db)) {
include("milfs/includes/datos.php");
}
if (!($link=mysql_connect($servidor,$usuario,$password)))
{
echo "Error conectando a la base de datos.";
exit();
}
if (!mysql_select_db($db,$link))
{
echo "Error seleccionando la base de datos.";
exit();
}
$_SESSION['path']= $path_instalacion;
$_SESSION['path_images_secure']= $path_images_secure;
$_SESSION['url']= $url;
$_SESSION['upload_size']= $upload_size;
return $link;
}
}
?>