PHP code example of dev_francissantiago / xwork-connect

1. Go to this page and download the library: Download dev_francissantiago/xwork-connect library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dev_francissantiago / xwork-connect example snippets




use xWorkPHP\DatabaseConnection;

$configFile = 'path/to/your/config.ini';
$dbConnection = new DatabaseConnection($configFile);

$xwfConnection = $dbConnection->getXWFConnection();
$firebirdConnection = $dbConnection->getFirebirdConnection();

// Use $xwfConnection e $firebirdConnection como instâncias de PDO
ini
; config.ini
[xwf]
dsn = "odbc:BaseDeTesteDSN"
user = ""
password = ""

[firebird]
dsn = "firebird:dbname=localhost:C:\\Radiocef Studio 2\\XWork\\Base_de_Teste_pk.fdb"
user = "SYSDBA"
password = "masterkey

xwork-connect/
├── src/
│   └── DatabaseConnection.php
├── config/
│   └── config.ini
├── tests/
│   └── DatabaseConnectionTest.php
├── .gitignore
└── composer.json