PHP Classes

File: test/generate-db-config.php

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Simple PHP ORM   test/generate-db-config.php   Download  
File: test/generate-db-config.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple PHP ORM
Manage objects stored in a database using a ORM
Author: By
Last change: Update Tool generate model folder
Date: 6 years ago
Size: 575 bytes
 

Contents

Class file image Download
<?php
use SimpleORM\Helper\Connector;
require_once
'../SimpleORM/autoload.php';
@
error_reporting(E_ALL);
@
ini_set('display_errors', -1);
$configs = array( 'host' => 'localhost',
       
'name' => 'd2_test2',
       
'user' => 'root',
       
'pwd' => '123456',
       
'port' => 3306,
       
'prefix' => 'tbl_',
       
'adapter' => 'mysqli',
       
'charset' => 'utf8',
       
'type' => 'mysql'
);
//file saved config name is "dbconfig.php"
$db = new Connector($configs);
$sSavePath = dirname(__FILE__) .DIRECTORY_SEPARATOR;
$sFilePath = SimpleORM\Helper\Tool::generateConfigFile($db,$sSavePath);
echo
$sFilePath;
exit;