devphp-pmro / pdo-conection
简单的PDO连接
1.0.1
2020-11-12 12:18 UTC
Requires
- ext-pdo: *
This package is not auto-updated.
Last update: 2024-09-27 08:46:03 UTC
README
#简单的PDO连接
要安装库,请运行以下命令
composer require devphp-pmro/pdo-conection
要使用库,只需使用composer自动加载,调用类并调用方法
<?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"; }
开发者
- [Leonardo] - 此库的开发者!
- [devphp] - 官方网站:https://devphp-pmro.github.io/
许可证
MIT