本文整理匯總了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();