本文整理汇总了PHP中AdminHelper::bytesToSize方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::bytesToSize方法的具体用法?PHP AdminHelper::bytesToSize怎么用?PHP AdminHelper::bytesToSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminHelper
的用法示例。
在下文中一共展示了AdminHelper::bytesToSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
<?php
if ($current_asset['title'] != $current_asset['location']) {
echo str_replace('"', '"', $current_asset['title']);
} else {
echo str_replace('"', '"', basename($current_asset['title']));
}
?>
</h3>
<?php
if ($page_message) {
echo '<p><span class="highlightcopy">' . $page_message . '</span></p>';
}
?>
<p class="smalltext fadedtext">
size: <?php
echo AdminHelper::bytesToSize($current_asset['size']);
?>
, stored on: <?php
echo AdminHelper::getConnectionName($current_asset['connection_id']);
?>
<br />
location: <?php
echo $current_asset['location'];
?>
<?php
if ($cash_admin->getStoredData('is_favorite')) {
echo '<br /><br /><span class="icon heart_fill"></span> this asset is a favorite<br />';
}
?>
</p><p>
<?php
示例2: foreach
} else {
echo '<div class="row_seperator">.</div>';
}
echo '<ul class="assetbrowse">';
if ($connection_id != 0) {
foreach ($list_assets['directories'] as $location => $directory) {
echo '<li><a href="' . ADMIN_WWW_BASE_PATH . '/assets/browse/connection/' . $connection_id . '/' . $location . '"><span class="icon folder_fill"></span> <b>/ ' . basename($directory) . '</b></a></li>';
}
foreach ($list_assets['assets'] as $asset) {
if ($asset['title'] == $asset['location']) {
$asset_title = basename($asset['location']);
} else {
$asset_title = $asset['title'];
}
echo '<li><a href="' . ADMIN_WWW_BASE_PATH . '/assets/edit/file/' . $asset['id'] . '"><span class="icon document_alt_fill"></span> ' . $asset_title . '</a>';
echo '<br /><span class="icon"></span> <span class="smalltext fadedtext nobr">' . $asset['location'] . '</span><br /><span class="icon"></span> <span class="smalltext fadedtext nobr">' . AdminHelper::bytesToSize($asset['size']) . ', accessed: [int]</span></li>';
}
} else {
foreach ($local_assets_reponse['payload'] as $asset) {
if ($asset['title'] == $asset['location']) {
$asset_title = basename($asset['location']);
} else {
$asset_title = $asset['title'];
}
echo '<li><a href="' . ADMIN_WWW_BASE_PATH . '/assets/edit/file/' . $asset['id'] . '"><span class="icon document_alt_fill"></span> ' . $asset_title . '</a>';
echo '<br /><span class="icon"></span> <span class="smalltext fadedtext nobr">' . $asset['location'] . '</span><br /><span class="icon"></span> <span class="smalltext fadedtext nobr"> accessed: [int]</span></li>';
}
}
echo '</ul>';
}
}