php-src/ext/spl/examples/dba_dump.php

28 lines
511 B
PHP
Raw Normal View History

2003-05-01 23:28:28 +00:00
<?php
/* dba dump utility
*
2003-07-16 21:52:03 +00:00
* Usage: php dba_dump <file> <handler> [<regex>]
*
* Show all groups in the ini file specified by <file>.
* The regular expression <regex> is used to filter the by setting name.
2003-05-01 23:28:28 +00:00
*
* Note: configure with --enable-dba
2003-06-22 12:57:53 +00:00
*
* (c) Marcus Boerger
2003-05-01 23:28:28 +00:00
*/
2003-07-16 21:52:03 +00:00
require_once("dba_reader.inc");
require_once("key_filter.inc");
2003-05-01 23:28:28 +00:00
2003-07-16 21:52:03 +00:00
$db = new dba_reader($argv[1], $argv[2]);
2003-05-01 23:28:28 +00:00
2003-07-16 21:52:03 +00:00
if ($argc>3) {
$db = new key_filter($db, $argv[3]);
2003-05-01 23:28:28 +00:00
}
foreach($db as $key => $val) {
echo "'$key' => '$val'\n";
}
?>