本文整理汇总了PHP中rex_file::formattedSize方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_file::formattedSize方法的具体用法?PHP rex_file::formattedSize怎么用?PHP rex_file::formattedSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_file
的用法示例。
在下文中一共展示了rex_file::formattedSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<thead>
<tr>
<th class="rex-table-icon"></th>
<th>' . rex_i18n::msg('backup_filename') . '</th>
<th class="rex-table-width-5">' . rex_i18n::msg('backup_filesize') . '</th>
<th class="rex-table-width-5">' . rex_i18n::msg('backup_createdate') . '</th>
<th class="rex-table-action" colspan="3">' . rex_i18n::msg('backup_function') . '</th>
</tr>
</thead>
<tbody>';
$dir = rex_backup::getDir();
$folder = rex_backup::getBackupFiles('.tar.gz');
foreach ($folder as $file) {
$filepath = $dir . '/' . $file;
$filec = date('d.m.Y H:i', filemtime($filepath));
$filesize = rex_file::formattedSize($filepath);
$content .= '<tr>
<td class="rex-table-icon"><i class="rex-icon rex-icon-file-archive"></i></td>
<td data-title="' . rex_i18n::msg('backup_filename') . '">' . $file . '</td>
<td data-title="' . rex_i18n::msg('backup_filesize') . '">' . $filesize . '</td>
<td data-title="' . rex_i18n::msg('backup_createdate') . '">' . $filec . '</td>
<td class="rex-table-action"><a href="' . rex_url::currentBackendPage(['function' => 'fileimport', 'impname' => $file]) . '" title="' . rex_i18n::msg('backup_import_file') . '" data-confirm="' . rex_i18n::msg('backup_proceed_file_import') . '"><i class="rex-icon rex-icon-import"></i> ' . rex_i18n::msg('backup_to_import') . '</a></td>
<td class="rex-table-action"><a href="' . rex_url::currentBackendPage(['function' => 'download', 'impname' => $file]) . '" title="' . rex_i18n::msg('backup_download_file') . '"><i class="rex-icon rex-icon-download"></i> ' . rex_i18n::msg('backup_download') . '</a></td>
<td class="rex-table-action"><a href="' . rex_url::currentBackendPage(['function' => 'delete', 'impname' => $file]) . '" title="' . rex_i18n::msg('backup_delete_file') . '" data-confirm="' . rex_i18n::msg('backup_delete') . ' ?"><i class="rex-icon rex-icon-delete"></i> ' . rex_i18n::msg('backup_delete') . '</a></td>
</tr>';
}
$content .= '
</tbody>
</table>
';
$fragment = new rex_fragment();