本文整理汇总了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>";
}