Jump to content

Config php para tu web


Ryen
 Share

Recommended Posts

Hola gente les dejo un config php para vuestras web que stes haciendo funciona perfectamente


 


Para incluirlo acualqueir arcihvo se usa



<?php require("inc/config.inc.php"); ?>//-- inc es la ruta donde esta el archivo, si esta en niveles superiores se añade ../inc/config.inc.php


guardamos como config.inc.php



<?php
$dbhost = "xxx.xxx.xxx.xxx"; //IP del servedior
$dbuser = "root"; //Usuario de la base de datos
$dbpass = "ryen"; //Contraseña de la base de datos
$mysql_db = "account"; // base de datos, no cambiar

$con=mysqli_connect($dbhost,$dbuser,$dbpass,$mysql_db) or die("Error al conectar con la base de datos");
?>

Saludos espero que les sirva


 


Para comprobar que funcione debereis tener el servidor encendido


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...