本文整理汇总了PHP中file_size函数的典型用法代码示例。如果您正苦于以下问题:PHP file_size函数的具体用法?PHP file_size怎么用?PHP file_size使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了file_size函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fileArray
function fileArray($src, $src1, $fileName, $id)
{
$func = new buildQuery('omeka_');
$name = $src . "/" . $func->filterFileName($fileName);
$size = file_size($src, $src1, $fileName);
$f_type = `file -i '{$name}'`;
$type = array_reverse(explode(' ', $f_type));
echo $f_type . "\n" . $type[0] . "\n";
$file = array();
$file['id'] = $id;
$file['item_id'] = $id;
$file['size'] = preg_replace('/\\n/', '', $size);
$file['has_derivative_image'] = 0;
$file['authentication'] = '';
$file['mime_browser'] = preg_replace('/\\n/', '', $type[0]);
$file['mime_os'] = preg_replace('/\\n/', '', $type[0]);
$file['type_os'] = preg_replace('/\\n/', '', $type[0]);
$file['archive_filename'] = $func->processFN($name);
$file['original_filename'] = mysql_real_escape_string($fileName);
$file['modified'] = '';
//timestamp;
$file['added'] = 'CURRENT_TIMESTAMP';
//current timestamp
$file['stored'] = 'CURRENT_TIMESTAMP';
return $file;
}
开发者ID:rsanc77,项目名称:import,代码行数:26,代码来源:southerHist.php
示例2: comment
public function comment()
{
$page = $this->version->entity();
$title = $this->title;
$link = 'http://samlib.ru/' . ltrim($page->absoluteLink(), '/');
$size = file_size($this->size());
$date = $this->version->encode('d/m/Y H:i:s');
$annotation = (string) app('plaintexter')->apply(new TransformableContainer($page->annotation));
$annotation = wordwrap($annotation, 120);
return "{$title} ({$size})\n{$date}\n\n{$link}\n\n{$annotation}";
}
开发者ID:ankhzet,项目名称:Ankh,代码行数:11,代码来源:FileVersion.php
示例3: get_total_size
public function get_total_size()
{
global $db_type;
$total = array();
if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') {
// Calculate total db size/row count
$result = DB::for_table('users')->raw_query('SHOW TABLE STATUS LIKE \'' . $this->feather->prefix . '%\'')->find_many();
$total['size'] = $total['records'] = 0;
foreach ($result as $status) {
$total['records'] += $status['Rows'];
$total['size'] += $status['Data_length'] + $status['Index_length'];
}
$total['size'] = file_size($total['size']);
}
return $total;
}
开发者ID:beaver-dev,项目名称:featherbb,代码行数:16,代码来源:statistics.php
示例4: forum_number_format
</legend>
<div class="infldset">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php
echo $pun_config['o_avatars_size'];
?>
" />
<label class="required"><strong><?php
echo $lang_profile['File'];
?>
<span><?php
echo $lang_common['Required'];
?>
</span></strong><br /><input name="req_file" type="file" size="40" /><br /></label>
<p><?php
echo $lang_profile['Avatar desc'] . ' ' . $pun_config['o_avatars_width'] . ' x ' . $pun_config['o_avatars_height'] . ' ' . $lang_profile['pixels'] . ' ' . $lang_common['and'] . ' ' . forum_number_format($pun_config['o_avatars_size']) . ' ' . $lang_profile['bytes'] . ' (' . file_size($pun_config['o_avatars_size']) . ').';
?>
</p>
</div>
</fieldset>
</div>
<p class="buttons"><input type="submit" name="upload" value="<?php
echo $lang_profile['Upload'];
?>
" /> <a href="javascript:history.go(-1)"><?php
echo $lang_common['Go back'];
?>
</a></p>
</form>
</div>
</div>
开发者ID:highpictv,项目名称:forum,代码行数:31,代码来源:profile.php
示例5: getTorrentDataSize
/**
* gets size of data of a torrent
*
* @param $transfer name of the torrent
* @return int with size of data of torrent.
* -1 if error
* 4096 if dir (lol ~)
*/
function getTorrentDataSize($transfer)
{
global $cfg;
$datapath = getTransferDatapath($transfer);
return $datapath != "" && $datapath != "." ? file_size(getTransferSavepath($transfer) . $datapath) : -1;
}
开发者ID:Ezerbeth,项目名称:torrentflux,代码行数:14,代码来源:functions.common.transfer.php
示例6: displayFiles
//.........这里部分代码省略.........
?>
');">
(<?php
echo $row['file_versions'];
?>
)
</a>
<?php
}
?>
</td>
<td width="10%" nowrap="nowrap" align="center">
<?php
echo $file_types[$row['file_category']];
?>
</td>
<td width="5%" align="center">
<a href="./index.php?m=tasks&a=view&task_id=<?php
echo $row['file_task'];
?>
">
<?php
echo $row['task_name'];
?>
</a>
</td>
<td width="15%" nowrap="nowrap">
<?php
echo $row["contact_first_name"] . ' ' . $row["contact_last_name"];
?>
</td>
<td width="5%" nowrap="nowrap" align="right">
<?php
echo file_size(intval($row['file_size']));
?>
</td>
<td width="15%" nowrap="nowrap" align="right">
<?php
echo $file_date->format($df . ' ' . $tf);
?>
</td>
<td width="10%"><?php
echo $row['file_co_reason'];
?>
</td>
<td nowrap="nowrap" align="center">
<?php
if ($canEdit && empty($row['file_checkout'])) {
?>
<a href="?m=files&a=co&file_id=<?php
echo $row['file_id'];
?>
">
<?php
echo dPshowImage(DP_BASE_URL . '/modules/files/images/up.png', '16', '16', 'checkout', 'checkout file');
?>
</a>
<?php
} else {
if ($row['file_checkout'] == $AppUI->user_id) {
?>
<a href="?m=files&a=addedit&ci=1&file_id=<?php
echo $row['file_id'];
?>
">
开发者ID:slawekmikula,项目名称:dotproject,代码行数:67,代码来源:folders_table.php
示例7: generar_zona_vinculos_item
static function generar_zona_vinculos_item($item, $accion, $enviar_div_wrapper = true)
{
if (!self::acceso_recursivo()) {
toba::solicitud()->set_cronometrar(true);
}
toba_js::cargar_consumos_globales(array('utilidades/toba_editor'));
$html_ayuda_editor = toba_recurso::ayuda(null, 'Presionando la tecla CTRL se pueden ver los enlaces hacia los editores de los distintos componentes de esta página');
$html_ayuda_cronometro = toba_recurso::ayuda(null, 'Ver los tiempos de ejecución en la generación de esta página');
$html_ayuda_ajax = toba_recurso::ayuda(null, 'Activar/Desactivar navegación interna de la operación via AJAX');
$html_ayuda_editor = toba_recurso::ayuda(null, 'Volver al editor de toba');
$solicitud = toba::solicitud()->get_id();
$link_cronometro = toba::vinculador()->get_url('toba_editor', '1000263', null, array('prefijo' => toba_editor::get_punto_acceso_editor()));
$link_analizador_sql = toba::vinculador()->get_url('toba_editor', '30000030', null, array('prefijo' => toba_editor::get_punto_acceso_editor()));
$link_logger = toba::vinculador()->get_url('toba_editor', '1000003', null, array('prefijo' => toba_editor::get_punto_acceso_editor()));
$link_archivos = toba::vinculador()->get_url('toba_editor', '30000029', null, array('prefijo' => toba_editor::get_punto_acceso_editor()));
$estilo = toba::proyecto()->get_parametro('estilo');
if ($enviar_div_wrapper) {
echo "<div id='editor_previsualizacion'>";
/*echo "<div id='editor_previsualizacion_colap'><img style='cursor:pointer;_cursor:hand;' title='Ocultar la barra'
src='".toba_recurso::imagen_toba('nucleo/expandir_izq.gif', false)."'
onclick='toggle_nodo(\$\$(\"editor_previsualizacion_cont\"))'/></div>";*/
}
echo "<span id='editor_previsualizacion_cont'>";
echo "<span id='editor_previsualizacion_vis'>";
//Logger
list($log_nivel, $log_cant) = toba::logger()->get_mensajes_minimo_nivel();
$niveles = toba::logger()->get_niveles();
$niveles[0] = 'INFO';
$img = self::imagen_editor('logger/' . strtolower($niveles[$log_nivel]) . '.gif', true);
$html_ayuda_logger = toba_recurso::ayuda(null, 'Visor de logs');
echo "<a href='{$link_logger}' target='logger' {$html_ayuda_logger} >" . $img . " {$log_cant}</a>\n";
//Cronometro
toba::cronometro()->marcar('Resumen toba_editor');
echo "<a href='{$link_cronometro}' target='logger' {$html_ayuda_cronometro} >\n" . toba_recurso::imagen_toba('clock.png', true) . ' ' . round(toba::cronometro()->tiempo_acumulado(), 2) . ' seg' . "</a> ";
//Memoria
if (function_exists('memory_get_peak_usage')) {
$memoria_pico = memory_get_peak_usage();
echo toba_recurso::imagen_toba('memory.png', true, 16, 16, 'Pico máximo de memoria que ha consumido el script actual');
echo ' ' . file_size($memoria_pico, 0) . ' ';
}
//Base de datos
$fuente = toba_admin_fuentes::instancia()->get_fuente_predeterminada(false, toba_editor::get_proyecto_cargado());
if ($fuente) {
try {
$base = toba_admin_fuentes::instancia()->get_fuente($fuente, toba_editor::get_proyecto_cargado())->get_db();
$info_db = $base->get_info_debug();
$total = 0;
foreach ($info_db as $info) {
if (isset($info['fin'])) {
$total += $info['fin'] - $info['inicio'];
}
}
$rol = toba::db()->get_rol_actual();
toba::memoria()->set_dato_instancia('previsualizacion_consultas', array('fuente' => $fuente, 'datos' => $info_db));
echo "<a href='{$link_analizador_sql}' target='logger'>" . toba_recurso::imagen_toba('objetos/datos_relacion.gif', true, 16, 16, 'Ver detalles de las consultas y comandos ejecutados en este pedido de página') . count($info_db) . " ({$rol})</a>";
} catch (toba_error $e) {
//Si no se tiene acceso a la base no se hace nada
}
}
//Archivos
$archivos = self::get_archivos_incluidos();
$total = 0;
foreach ($archivos as $arch) {
$total += filesize($arch);
}
toba::memoria()->set_dato_instancia('previsualizacion_archivos', $archivos);
echo "<a href='{$link_archivos}' target='logger'>" . toba_recurso::imagen_toba('nucleo/php.gif', true, 16, 16, 'Ver detalle de archivos .php del proyecto incluidos en este pedido de página') . ' ' . count($archivos) . " arch. (" . file_size($total, 0) . ')</a>';
//Session
$tamano = file_size(strlen(serialize($_SESSION)), 0);
echo toba_recurso::imagen_toba('sesion.png', true, 16, 16, 'Tamaño de la sesión') . " {$tamano} ";
echo "</span>";
//-- ACCIONES
echo "<span id='editor_previsualizacion_acc'>";
$perfiles = array(apex_ef_no_seteado => '-- Todos --');
foreach (toba::manejador_sesiones()->get_perfiles_funcionales() as $perfil) {
$perfiles[$perfil] = $perfil;
}
$actuales = toba::manejador_sesiones()->get_perfiles_funcionales_activos();
$actual = null;
if (count($actuales) == 1) {
$actual = current($actuales);
}
$js = "title='Cambia el perfil actual del usuario' onchange=\"location.href = toba_prefijo_vinculo + '&perfil_activo=' + this.value\"";
echo "Perfiles: " . toba_form::select('cambiar_perfiles', $actual, $perfiles, 'ef-combo', $js);
//Usuario de la base
$hay_limitado = false;
if (!isset(self::$fuentes)) {
self::$fuentes = toba_info_editores::get_fuentes_datos(toba_editor::get_proyecto_cargado());
}
foreach (self::$fuentes as $fuente) {
if ($fuente['permisos_por_tabla']) {
$hay_limitado = true;
}
}
if ($hay_limitado) {
$actual = self::$memoria['conexion_limitada'] ? 'limitado' : 'normal';
$datos = array("normal" => "Normal", "limitado" => "Limitados");
$js = "title='Cambia temporalmente el usuario de conexión a la base' onchange=\"location.href = toba_prefijo_vinculo + '&usuario_conexion=' + this.value\"";
echo "Permisos DB: " . toba_form::select('cambiar_rol', $actual, $datos, 'ef-combo', $js);
}
//.........这里部分代码省略.........
开发者ID:emma5021,项目名称:toba,代码行数:101,代码来源:toba_editor.php
示例8: file_size
<tr>
<td><?php
echo $i;
$i++;
?>
</td>
<td><?php
echo $utf8_name;
?>
</td>
<td><?php
echo $key;
?>
</td>
<td><?php
echo file_size(filesize($path . '/' . $item));
?>
</td>
<td><?php
echo is_readable($path . '/' . $item) ? '是' : '否';
?>
</td>
<td><?php
echo is_writeable($path . '/' . $item) ? '是' : '否';
?>
</td>
<td><?php
echo is_executable($path . '/' . $item) ? '是' : '否';
?>
</td>
<td><a href="<?php
开发者ID:ltysGitHub,项目名称:DIR_manager,代码行数:31,代码来源:index.php
示例9: foreach
if (isset($_GET['table']) && AJAX_request()) {
$html = '<div class="table-responsive"><table class="table table-hover ' . $table_fixed . '"><thead><tr>';
if ($table_fixed == '') {
$html .= '<th class="col-md-4">' . $lang[5] . '</th><th class="hidden-xs col-md-2">' . $lang[6] . '</th><th class="hidden-xs col-md-2">' . $lang[7] . '</th><th class="hidden-xs col-md-2">' . $lang[28] . '</th>';
} else {
$html .= '<th class="col-xs-12 col-sm-6">' . $lang[5] . '</th><th class="hidden-xs col-xs-2 col-sm-2 col-md-2">' . $lang[6] . '</th><th class="hidden-xs col-xs-2 col-sm-2 col-md-2">' . $lang[7] . '</th>';
}
$html .= '<th class="hidden-xs col-md-2">' . $lang[8] . '</th></tr></thead><tbody>';
//output appropriate items
if (is_array($files) || is_object($files)) {
foreach ($files as $index => $file) {
$html .= '<tr>';
if ($table_fixed == '') {
$html .= '<td class="col-md-3">' . showfile($file) . '</td><td class="hidden-xs col-md-2">' . file_size($file) . '</td><td class="hidden-xs col-md-2">' . extension($file) . '</td><td class="hidden-xs col-md-2">' . fileTime($index, $file) . '</td>';
} else {
$html .= '<td class="col-xs-12 col-sm-5">' . showfile($file) . '</td><td class="hidden-xs col-xs-2 col-sm-2 col-md-2">' . file_size($file) . '</td><td class="hidden-xs col-xs-2 col-sm-2 col-md-2"><span class="label label-default">' . extension($file) . '</span></td>';
}
$html .= '<td class="hidden-xs col-xs-3 col-sm-3 col-md-3">' . action($file) . '</td></tr>';
}
}
$html .= '<tr>';
if ($table_fixed == '') {
$html .= '<td colspan="5" class="col-xs-12 col-sm-12 col-md-12">';
} else {
$html .= '<td colspan="4" class="col-xs-12 col-sm-12 col-md-12">';
}
$html .= $lang[9] . ' : <mark>' . $page . '</mark> ' . $lang[10] . ' : <mark>' . $total_files . '</mark></td></tr></tbody></table></div>';
if ($alert_msg != '') {
$alert_msg = alert($alert_msg);
}
$response = array('table' => $html, 'total' => $total_pages, 'page' => $page, 'dir' => $directory, 'dirHtml' => GetOldirectory(), 'alert' => $alert_msg);
开发者ID:onexite,项目名称:File-Manager,代码行数:31,代码来源:index.php
示例10: switch
<?php
/*
* Created by Kolerts
*/
if (!isset($_REQUEST['func'])) {
echo "Error: bad request!";
exit;
}
switch ($_REQUEST['func']) {
case 'detail_xml':
if (isset($_REQUEST['record'])) {
$path = "custom/kXML/xml/{$_REQUEST['path']}/{$_REQUEST['record']}.xml";
if (file_exists($path)) {
echo "<b>Имя файла</b>: {$_REQUEST['record']}.xml";
echo "<br/><b>Размер файла</b>: " . file_size($path);
if (!$_REQUEST['custom_generate']) {
echo "<br/><b>Кол-во элементов</b>: " . count_elements("{$_REQUEST['path']}/{$_REQUEST['record']}");
}
echo "<br/><b>Дата изменения файла</b>: " . date("d/m/Y H:i:s.", filemtime($path));
} else {
echo "Error: can't access to file!";
}
} else {
echo "Error: bad request!";
}
break;
case 'delete_xml':
include_once 'modules/kXML/add_functions.php';
$_REQUEST['record'] = str_replace('.php', '', $_REQUEST['record']);
$path = "custom/kXML/xml/{$_REQUEST['path']}/{$_REQUEST['record']}.xml";
开发者ID:omusico,项目名称:sugar_work,代码行数:31,代码来源:ajax.php
示例11: array
$targetDir = $targetDir . DIRECTORY_SEPARATOR;
$filter = $targetDir;
$files = array();
$sort = array();
foreach (glob($filter . "*", GLOB_BRACE) as $file) {
//echo $file;
// if file isn't this directory or its parent, add it to the results
$filepath = $file;
$file = explode(DIRECTORY_SEPARATOR, $file);
$file = $file[count($file) - 1];
//print_r($file);
// echo $file . "<br>";
if (is_dir($filepath)) {
} else {
$imginfo = @getimagesize($filepath);
$files[] = array("name" => $file, "type" => pathinfo($file, PATHINFO_EXTENSION), "raw_size" => filesize($filepath), "size" => file_size(filesize($filepath)), "a_time" => date("F d Y H:i:s", fileatime($filepath)), "c_time" => date("F d Y H:i:s", filectime($filepath)), "m_time" => date("F d Y H:i:s", filemtime($filepath)), "raw_m_time" => filemtime($filepath), "perms" => fileperms($filepath), "image_w" => $imginfo[0], "image_h" => $imginfo[1], "image_t" => $imginfo[2]);
switch ($sorter) {
case 1:
$sort[] = $file;
break;
case 3:
$sort[] = filesize($filepath);
break;
case 4:
$sort[] = strtolower(pathinfo($file, PATHINFO_EXTENSION));
break;
case 20:
$sort[] = filemtime($filepath);
break;
case 21:
$sort[] = fileatime($filepath);
开发者ID:WilliamStam,项目名称:Directory,代码行数:31,代码来源:index.php
示例12: array
$update = array('use_gravatar' => 0);
$data = array(':id' => $id);
$db->update('users', $update, 'id=:id', $data);
} else {
message($lang_profile['Unknown failure']);
}
redirect(panther_link($panther_url['profile_personality'], array($id)), $lang_profile['Avatar upload redirect']);
}
$page_title = array($panther_config['o_board_title'], $lang_common['Profile'], $lang_profile['Upload avatar']);
$required_fields = array('req_file' => $lang_profile['File']);
$focus_element = array('upload_avatar', 'req_file');
define('PANTHER_ACTIVE_PAGE', 'profile');
require PANTHER_ROOT . 'header.php';
$csrf_token = generate_csrf_token();
$tpl = load_template('upload_avatar.tpl');
echo $tpl->render(array('lang_profile' => $lang_profile, 'lang_common' => $lang_common, 'form_action' => panther_link($panther_url['upload_avatar'], array($id, $csrf_token)), 'csrf_token' => $csrf_token, 'panther_config' => $panther_config, 'avatar_size' => forum_number_format($panther_config['o_avatars_size']), 'file_size' => file_size($panther_config['o_avatars_size'])));
require PANTHER_ROOT . 'footer.php';
} else {
if ($action == 'delete_avatar') {
confirm_referrer('profile.php');
if ($panther_user['id'] != $id && !$panther_user['is_admmod']) {
message($lang_common['No permission'], false, '403 Forbidden');
}
delete_avatar($id);
redirect(panther_link($panther_url['profile_personality'], array($id)), $lang_profile['Avatar deleted redirect']);
} else {
if (isset($_POST['update_group_membership'])) {
confirm_referrer('profile.php');
if (!$panther_user['is_admin']) {
message($lang_common['No permission'], false, '403 Forbidden');
}
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:profile.php
示例13: array
if ($panther_config['o_feed_type'] == '2') {
$feed = array('type' => 'atom', 'link' => panther_link($panther_url['topic_atom'], array($id)), 'lang' => $lang_common['Atom topic feed']);
}
}
break;
}
($hook = get_extensions('footer_feedsr')) ? eval($hook) : null;
}
// Display debug info (if enabled/defined)
if ($panther_config['o_debug_mode'] == '1') {
// Calculate script generation time
$time_diff = sprintf('%.3f', microtime(true) - $panther_start);
$debug_info = sprintf($lang_common['Querytime'], $time_diff, $db->get_num_queries());
if (function_exists('memory_get_usage')) {
$debug_info .= ' - ' . sprintf($lang_common['Memory usage'], file_size(memory_get_usage()));
if (function_exists('memory_get_peak_usage')) {
$debug_info .= ' ' . sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage()));
}
}
} else {
$debug_info = '';
}
$queries = $panther_config['o_show_queries'] == '1' ? display_saved_queries() : '';
// End the transaction
$db->end_transaction();
$style_path = ($panther_config['o_style_path'] != 'style' ? $panther_config['o_style_path'] : PANTHER_ROOT . $panther_config['o_style_path']) . '/' . $panther_user['style'] . '/templates/';
$tpl = defined('PANTHER_ADMIN_CONSOLE') && (file_exists($style_path . 'admin_footer.tpl') || $panther_user['style'] == $panther_config['o_default_style'] && !file_exists($style_path)) ? 'admin_footer.tpl' : 'footer.tpl';
$tpl = load_template($tpl);
echo $tpl->render(array('footer_style' => isset($footer_style) ? $footer_style : '', 'controls' => $controls, 'quickjump' => $quickjump_tpl, 'lang_common' => $lang_common, 'links' => $links, 'panther_config' => $panther_config, 'feed' => $feed, 'debug_info' => $debug_info, 'queries' => $queries));
ob_flush();
exit;
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:footer.php
示例14: __
} else {
$server_load = __('Not available', 'luna');
}
// Get number of current visitors
$result = $db->query('SELECT COUNT(user_id) FROM ' . $db->prefix . 'online WHERE idle=0') or error('Unable to fetch online count', __FILE__, __LINE__, $db->error());
$num_online = $db->result($result);
// Collect some additional info about MySQL
if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') {
// Calculate total db size/row count
$result = $db->query('SHOW TABLE STATUS LIKE \'' . $db->prefix . '%\'') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error());
$total_records = $total_size = 0;
while ($status = $db->fetch_assoc($result)) {
$total_records += $status['Rows'];
$total_size += $status['Data_length'] + $status['Index_length'];
}
$total_size = file_size($total_size);
}
// Check for the existence of various PHP opcode caches/optimizers
if (function_exists('mmcache')) {
$php_accelerator = '<a href="http://' . __('turck-mmcache.sourceforge.net/', 'luna') . '">' . __('Turck MMCache', 'luna') . '</a>';
} elseif (isset($_PHPA)) {
$php_accelerator = '<a href="http://' . __('www.php-accelerator.co.uk/', 'luna') . '">' . __('ionCube PHP Accelerator', 'luna') . '</a>';
} elseif (ini_get('apc.enabled')) {
$php_accelerator = '<a href="http://' . __('www.php.net/apc/', 'luna') . '">' . __('Alternative PHP Cache (APC)', 'luna') . '</a>';
} elseif (ini_get('zend_optimizer.optimization_level')) {
$php_accelerator = '<a href="http://' . __('www.zend.com/products/guard/zend-optimizer/', 'luna') . '">' . __('Zend Optimizer', 'luna') . '</a>';
} elseif (ini_get('eaccelerator.enable')) {
$php_accelerator = '<a href="http://' . __('www.eaccelerator.net/', 'luna') . '">' . __('eAccelerator', 'luna') . '</a>';
} elseif (ini_get('xcache.cacher')) {
$php_accelerator = '<a href="http://' . __('xcache.lighttpd.net/', 'luna') . '">' . __('XCache', 'luna') . '</a>';
} else {
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:system.php
示例15: file_size
?>
<tr>
<td><?php
echo $icon;
?>
</td>
<td><?php
echo "<a href=\"{$link}\">{$name}</a>";
?>
</td>
<td><?php
echo $type;
?>
</td>
<td><?php
echo file_size($size);
?>
</td>
</tr>
<?php
}
?>
</table>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"></script>
<script>
var options={
//Boolean - Whether we should show a stroke on each segment
segmentShowStroke : true,
开发者ID:sellfisch,项目名称:scandir,代码行数:30,代码来源:scandir.php
示例16: sprintf
* Licensed under GPLv3 (http://getluna.org/license.php)
*/
// Make sure no one attempts to run this script "directly"
if (!defined('FORUM')) {
exit;
}
// Display debug info (if enabled/defined)
if (defined('FORUM_DEBUG')) {
echo '<p id="debug">[ ';
// Calculate script generation time
$time_diff = sprintf('%.3f', get_microtime() - $luna_start);
echo sprintf(__('Generated in %1$s seconds, %2$s queries executed', 'luna'), $time_diff, $db->get_num_queries());
if (function_exists('memory_get_usage')) {
echo ' - ' . sprintf(__('Memory usage: %1$s', 'luna'), file_size(memory_get_usage()));
if (function_exists('memory_get_peak_usage')) {
echo ' ' . sprintf(__('(Peak: %1$s)', 'luna'), file_size(memory_get_peak_usage()));
}
}
echo ' ]</p>' . "\n";
}
// End the transaction
$db->end_transaction();
?>
</div>
</div>
</div>
<script src="../include/js/vendor/jquery.js"></script>
<script src="../include/js/vendor/bootstrap.min.js"></script>
<script src="../include/js/vendor/colours.min.js"></script>
<script language="javascript">
var flat_palette = [
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:footer.php
示例17: asset
<div class="well well-sm">
<?php
if ($file) {
?>
<div class="pull-right">
<a href="<?php
echo asset($file);
?>
" class="btn btn-xs btn-info"><?php
echo $filename;
?>
| <?php
echo file_size($filesize);
?>
</a>
<a href="<?php
echo $removeAction;
?>
" class="btn btn-xs btn-danger"><i class="icon-remove"></i> Удалить</a>
</div>
<?php
}
?>
<?php
echo Form::file($field);
?>
</div>
开发者ID:devhook,项目名称:devhook,代码行数:27,代码来源:file.php
示例18: sprintf
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<?php
// Display debug info (if enabled/defined)
if (defined('FEATHER_DEBUG')) {
echo '<p id="debugtime">[ ';
// Calculate script generation time
$time_diff = sprintf('%.3f', get_microtime() - $feather_start);
echo sprintf($lang_common['Querytime'], $time_diff, count(\DB::get_query_log()[0]));
if (function_exists('memory_get_usage')) {
echo ' - ' . sprintf($lang_common['Memory usage'], file_size(memory_get_usage()));
if (function_exists('memory_get_peak_usage')) {
echo ' ' . sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage()));
}
}
echo ' ]</p>' . "\n";
}
// Display executed queries (if enabled)
if (defined('FEATHER_SHOW_QUERIES')) {
display_saved_queries();
}
?>
</div>
<div class="end-box"></div>
</div>
</body>
</html>
开发者ID:beaver-dev,项目名称:featherbb,代码行数:31,代码来源:footer.php
示例19: file_size
echo $file['file_task'];
?>
">
<?php
echo $file['task_name'];
?>
</a>
</td>
<td width="15%" nowrap="nowrap">
<?php
echo $file["contact_first_name"] . ' ' . $file["contact_last_name"];
?>
</td>
<td width="5%" nowrap="nowrap" align="right">
<?php
echo file_size(intval($file['file_size']));
?>
</td>
<td nowrap="nowrap">
<?php
echo mb_substr($file['file_type'], mb_strpos($file['file_type'], '/') + 1);
?>
</td>
<td width="15%" nowrap="nowrap" align="right">
<?php
echo $hdate->format("{$df} {$tf}");
?>
</td>
</tr>
<?php
}
开发者ID:hightechcompany,项目名称:dotproject,代码行数:31,代码来源:index_table.php
示例20: createCell
//.........这里部分代码省略.........
$prefix = $prefix == 'department' ? 'dept' : $prefix;
$link .= $prefix . '_id=' . $this->tableRowData[$prefix . '_id'];
$link .= $prefix == 'task_log' ? '&tab=1&task_id=' . $this->tableRowData['task_id'] : '';
$icon = $fieldName == 'file_name' ? '<img src="' . w2PfindImage(getIcon($this->tableRowData['file_type']), 'files') . '" /> ' : '';
$cell = '<a href="' . $link . '">' . $icon . $value . '</a>';
//TODO: task_logs are another oddball..
$cell = $prefix == 'task_log' ? str_replace('task_logs', 'tasks', $cell) : $cell;
break;
case '_author':
case '_creator':
case '_owner':
case '_updator':
if ((int) $value) {
$obj = new CContact();
$obj->findContactByUserid($value);
$suffix .= ' nowrap';
$link = '?m=users&a=view&user_id=' . $value;
$cell = '<a href="' . $link . '">' . $obj->contact_display_name . '</a>';
} else {
$cell = $value;
}
break;
// The above are all contact/user display names, the below are numbers.
// The above are all contact/user display names, the below are numbers.
case '_count':
case '_hours':
$cell = $value;
break;
case '_duration':
$durnTypes = w2PgetSysVal('TaskDurationType');
$cell = $value . ' ' . $this->AppUI->_($durnTypes[$this->tableRowData['task_duration_type']]);
break;
case '_size':
$cell = file_size($value);
break;
case '_budget':
$cell = w2PgetConfig('currency_symbol');
$cell .= formatCurrency($value, $this->AppUI->getPref('CURRENCYFORM'));
break;
case '_url':
$value = str_replace(array('"', '"', '<', '>'), '', $value);
$cell = w2p_url($value);
break;
case '_email':
$cell = w2p_email($value);
break;
case '_birthday':
case '_date':
$myDate = intval($value) ? new w2p_Utilities_Date($value) : null;
$cell = $myDate ? $myDate->format($this->df) : '-';
break;
case '_actual':
$end_date = intval($this->tableRowData['project_end_date']) ? new w2p_Utilities_Date($this->tableRowData['project_end_date']) : null;
$actual_end_date = intval($this->tableRowData['project_actual_end_date']) ? new w2p_Utilities_Date($this->tableRowData['project_actual_end_date']) : null;
$style = $actual_end_date < $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
if ($actual_end_date) {
$cell = '<a href="?m=tasks&a=view&task_id=' . $this->tableRowData['project_last_task'] . '" ' . $style . '>' . $actual_end_date->format($this->df) . '</a>';
} else {
$cell = '-';
}
break;
case '_created':
case '_datetime':
case '_update':
case '_updated':
$myDate = intval($value) ? new w2p_Utilities_Date($this->AppUI->formatTZAwareTime($value, '%Y-%m-%d %T')) : null;
开发者ID:illuminate3,项目名称:web2project,代码行数:67,代码来源:HTMLHelper.class.php
注:本文中的file_size函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论