Speed up development with full-stack environments for every branch.

Learn More

How to List all databases opened with DBA [PHP]

30 Runs 129 Views 15 Copies
Saved

Saved

gtsolutions 373

gtsolutions
published 4 years ago

<?php

/*
 * PHP DBA module
 * list all open databases opened with DBA
 */

//setting div style for nicer display
$divStyle = ' background-color:#E8E8E3;
            padding:10px;
            color:#000;
            font-size:16px;
            width:500px;
            margin:0 auto;';

//open some databases
$id = dba_open("test.db", "r", "cdb");
$id2 = dba_open("test2.db", "r", "db4");

echo '<div style="' . $divStyle . '">
<b><u>These are the database opened by DBA:</u></b>
<br /><br />
<pre>';
print_r(dba_list());
echo '</pre>
    </div>';
?>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).