PHP code example of jord-jd / php-dcom

1. Go to this page and download the library: Download jord-jd/php-dcom 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/ */

    

jord-jd / php-dcom example snippets




use \JordJD\DCOM\DCOM;

$mysqli = DCOM::getConnection("main");

use JordJD\DCOM\Exceptions\ConnectionException;

try {
    $connection = DCOM::getConnection('main');
} catch (ConnectionException $exception) {
    // Handle a failed database connection.
}