本文整理汇总了PHP中Executor::key方法的典型用法代码示例。如果您正苦于以下问题:PHP Executor::key方法的具体用法?PHP Executor::key怎么用?PHP Executor::key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Executor
的用法示例。
在下文中一共展示了Executor::key方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
if ($argc < 7) {
echo "usage:\n";
echo "\tphp space.php <ignore-root> \"localhost\" - - - <usage-file> [expand-file] [--force]\n";
echo "\tphp space.php <ignore-root> <hostname> <port> <user> <key> <usage-file> [expand-file] [--force]\n";
die;
}
$ignore_root = intval($argv[1]);
$hostname = $argv[2];
$usage_file = $argv[6];
$expand_directories = empty($argv[7]) ? array() : read_json_array($argv[7]);
$force = isset($argv[8]) && $argv[8] === "--force";
if ($hostname != "localhost") {
Executor::$host = $hostname;
Executor::$port = is_numeric($argv[3]) ? intval($argv[3]) : 22;
Executor::$user = $argv[4];
Executor::$key = $argv[5];
}
$space = new Capacity();
$mounts1 = list_mounts("type ext");
$mounts2 = list_mounts("type fuse.mfs");
$mounts = array_merge($mounts1, $mounts2);
asort($mounts);
if (!$force) {
$json = read_json_array($usage_file);
$usage = $json["usage"];
$capacity = $json["capacity"];
} else {
$usage = array();
$capacity = array();
}
foreach ($mounts as $partition => $path) {