本文整理汇总了PHP中Flight::reddcoin方法的典型用法代码示例。如果您正苦于以下问题:PHP Flight::reddcoin方法的具体用法?PHP Flight::reddcoin怎么用?PHP Flight::reddcoin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flight
的用法示例。
在下文中一共展示了Flight::reddcoin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unlink
unlink(Flight::get('backupPath') . "/{$file}");
}
}
closedir($dh);
}
} else {
if (file_exists(Flight::get('backupPath') . "/{$id}")) {
unlink(Flight::get('backupPath') . "/{$id}");
}
}
Flight::redirect("/backup");
});
Flight::route('/address/@account', function ($account) {
$newAddress = $account == 'Default' ? Flight::reddcoin()->getnewaddress('') : Flight::reddcoin()->getnewaddress($account);
Flight::redirect("/myaddresses/{$account}/{$newAddress}");
});
Flight::route('/account', function () {
Flight::redirect("/address/" . Flight::request()->data->account);
});
Flight::route('/stats', function () {
$newArray = array("averageweight" => Flight::get('getstaking')['averageweight'], "totalweight" => Flight::get('getstaking')['totalweight'], "netstakeweight" => Flight::get('getstaking')['netstakeweight'], "interest" => Flight::reddcoin()->getinterest(), "balance" => Flight::get('getinfo')['balance'], "connections" => Flight::get('getinfo')['connections'], "time" => time());
if (!file_exists(Flight::get('dbPath') . '/stats.dat')) {
file_put_contents(Flight::get('dbPath') . '/stats.dat', serialize(array($newArray)));
} else {
$array = unserialize(file_get_contents(Flight::get('dbPath') . '/stats.dat'));
array_push($array, $newArray);
file_put_contents(Flight::get('dbPath') . '/stats.dat', serialize($array));
}
Flight::redirect("/overview");
});
Flight::start();