Working prototype
This commit is contained in:
Binary file not shown.
@@ -53,7 +53,7 @@ EOD;
|
|||||||
$options = new Console_Getopt();
|
$options = new Console_Getopt();
|
||||||
|
|
||||||
$shortoptions = "hV";
|
$shortoptions = "hV";
|
||||||
$longoptions = array("warning", "file=", "md5");
|
$longoptions = array("warning", "file=", "md5=");
|
||||||
|
|
||||||
$args = $options->readPHPArgv();
|
$args = $options->readPHPArgv();
|
||||||
$ret = $options->getopt($args, $shortoptions, $longoptions);
|
$ret = $options->getopt($args, $shortoptions, $longoptions);
|
||||||
@@ -83,13 +83,26 @@ if(sizeof($opts) > 0)
|
|||||||
$filename = $o[1];
|
$filename = $o[1];
|
||||||
echo $filename . "\n";
|
echo $filename . "\n";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '--md5':
|
||||||
|
$md5 = $o[1];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '--warning':
|
||||||
|
echo "";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = 'fil';
|
$file = md5_file($filename);
|
||||||
echo md5_file($file);
|
|
||||||
|
|
||||||
|
if ($file == $md5)
|
||||||
|
{
|
||||||
|
echo "They match\n";
|
||||||
|
}
|
||||||
|
echo $file;
|
||||||
|
echo "\n\n";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user