00001 <?php
00002
00017 if ($argc < 3) {
00018 echo <<<EOF
00019 Usage: php ${_SERVER['PHP_SELF']} <file> <handler> [<regex>]
00020
00021 Show all groups in the ini file specified by <file>.
00022 The regular expression <regex> is used to filter the by setting name.
00023
00024
00025 EOF;
00026 exit(1);
00027 }
00028
00029 if (!class_exists("DbaReader", false)) require_once("dbareader.inc");
00030 if (!class_exists("KeyFilter", false)) require_once("keyfilter.inc");
00031
00032 $db = new DbaReader($argv[1], $argv[2]);
00033
00034 if ($argc>3) {
00035 $db = new KeyFilter($db, $argv[3]);
00036 }
00037
00038 foreach($db as $key => $val) {
00039 echo "'$key' => '$val'\n";
00040 }
00041
00042 ?>