Back to index

php5  5.3.10
ini_groups.php
Go to the documentation of this file.
00001 <?php
00002 
00017 if ($argc < 2) {
00018        echo <<<EOF
00019 Usage: php dba_dump.php <file> [<regex>]
00020 
00021 Show all groups in the ini file specified by <file>.
00022 The regular expression <regex> is used to filter the result.
00023 
00024 
00025 EOF;
00026        exit(1);
00027 }
00028 
00029 if (!class_exists("KeyFilter", false)) require_once("keyfilter.inc");
00030 if (!class_exists("IniGroups", false)) require_once("inigroups.inc");
00031 
00032 $it = new IniGroups($argv[1]);
00033 if ($argc>2) {
00034        $it = new KeyFilter($it, $argv[2]);
00035 }
00036 
00037 foreach($it as $group) {
00038        echo "$group\n";
00039 }
00040 
00041 ?>