本文整理匯總了PHP中sql_query::stats_diskusage方法的典型用法代碼示例。如果您正苦於以下問題:PHP sql_query::stats_diskusage方法的具體用法?PHP sql_query::stats_diskusage怎麽用?PHP sql_query::stats_diskusage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sql_query
的用法示例。
在下文中一共展示了sql_query::stats_diskusage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
function render_html()
{
// Title + Summary
print "<h3>DATABASE BACKUP</h3><br>";
print "<p>This page allows an administrator to perform an export of the entire MySQL database and download it as a file. This feature\n\t\t\tensures that no matter who runs your instance of the Amberdms Billing System, your data can always be retrieved.</p>";
print "<p>The file generated is a standard SQL file compressed with gzip, it can be easily restored using the MySQL command line or\n\t\t\tvia a utility such as phpmyadmin.</p>";
// report on usage
$sql_obj = new sql_query();
$usage = $sql_obj->stats_diskusage();
format_msgbox("info", "<p>Estimated download size: " . format_size_human($usage) . " (before compression)</p>");
// run check for file-system based journal files
$sql_obj = new sql_query();
$sql_obj->string = "SELECT id FROM file_uploads WHERE file_location != 'db' LIMIT 1";
$sql_obj->execute();
if ($sql_obj->num_rows()) {
format_msgbox("important", "<p>Some of the files stored in the journal have been saved to the filesystem rather than the MySQL database. This backup will provide a copy of the database, but you will also need to download the contents of the data/ directory.</p>");
}
// export link
print "<br>";
print "<a class=\"button\" href=\"admin/db_backup-process.php\">Export Database</a>";
}