devphp-pmro/pdo-conection

simple connect pdo

1.0.1 2020-11-12 12:18 UTC

This package is not auto-updated.

Last update: 2024-05-10 07:02:29 UTC


README

#simple connect pdo

To install the library, run the following command:

composer require devphp-pmro/pdo-conection

To use the library, simply require the composer to autoload, invoke the class and call the method:

<?php

open the DB_CONF.php file and enter the credentials for connecting to the database

//define the connection settings to the database connect
//inset your credentials.

    DEFINE("BD",
           ["host" => "host",
               "data_base" => "data_base",
               "user" => "user",
               "password"=>"password",
               "port"=>"3306"]
        );




default port 3306


in the example_connection directory, connection.php file

 use Source\pdoConection\Conection;

    require_once __DIR__."/../vendor/autoload.php";

    $com = new Conection();

    if(!$com){
        die();
    } else{
        echo "connected";
    }

Developers

License

MIT