本文整理汇总了PHP中bytestostring函数的典型用法代码示例。如果您正苦于以下问题:PHP bytestostring函数的具体用法?PHP bytestostring怎么用?PHP bytestostring使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bytestostring函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: truncate_filename
<td colspan="4"><a href="' . $_SERVER['PHP_SELF'] . '?type=' . $_GET['type'] . '&thedir=' . $dir_name_path[$ii] . '/&sa=' . $_GET['sa'] . '" title="' . TXT_BROWSE . '">' . $dir_name[$ii] . '</a></td>
<td><input class="delcheckbox" type="checkbox" name="dir_to_del[' . $dir_name_path[$ii] . ']" value="1" /></td></tr>';
}
//Now show the directory files
for ($i = 0; $i < count($file['name']); $i++) {
$row_color = @$row_color == "r1" ? "r2" : "r1";
//IF stand alone or Plug-in, dont create the install links
if ($_GET['sa'] == 1) {
$make_link = '<span title="' . $file['name'][$i] . ' ' . $file['width'][$i] . ' ' . $file['height'][$i] . '">' . truncate_filename($file['name'][$i]) . '</span>';
} else {
$make_link = '<a href="#" onclick="selectURL(\'' . CHANGE_URL . $_GET['thedir'] . $file['name'][$i] . '\');" title="' . TXT_SELECT_FILE . ' ' . $file['name'][$i] . ' ' . $file['width'][$i] . ' ' . $file['height'][$i] . '">' . truncate_filename($file['name'][$i]) . '</a>';
}
echo '<tr class="' . $row_color . '">
<td><img src="img/icons/' . return_mime_type_icon($file['name'][$i]) . '" width="16" height="16" alt="' . $file['name'][$i] . ' ' . $file['width'][$i] . ' ' . $file['height'][$i] . '" /></td>
<td>' . $make_link . '</td>
<td>' . bytestostring($file['size'][$i], 1) . '</td>
<td>' . $file['type'][$i] . '</td>
<td>' . date(DATE_FORMAT, $file['modified'][$i]) . '</td>
<td><input class="delcheckbox" type="checkbox" name="file_to_del[' . $file['name'][$i] . ']" value="1" /></td></tr>';
}
echo '</table>';
?>
</form></div>
</fieldset>
<script type="text/javascript">
function confirm_del(f){
var Frm = document.forms[0];
var e, i = 0, checked = false;
while (e = f.elements[i++]) {if (e.type == 'checkbox' && e.checked) checked = true};
示例2: IsOdd
?>
</th>
<th class="nohover"><?php
echo $actionhead;
?>
</th></tr>
<?php
for ($i = $showpagestart; $i < $showpageend; $i++) {
$alt = IsOdd($i) ? 'r1' : 'r0';
echo '<tr class="' . $alt . '">';
if ($typenow == 'image') {
echo '<td><a class="imghover" href="#" onclick="return false;" title="' . $file['name'][$i] . ' ' . TB_DATE . ': ' . date($tinybrowser['dateformat'], $file['modified'][$i]) . ' ' . TB_DIMENSIONS . ': ' . $file['width'][$i] . ' x ' . $file['height'][$i] . '"><img src="' . $thumbpath . '_thumbs/_' . $file['name'][$i] . $imagerefresh . '" alt="" />' . truncate_text($file['name'][$i], 30) . '</a></td>';
} else {
echo '<td title="' . $file['name'][$i] . ' ' . TB_DATE . ': ' . date($tinybrowser['dateformat'], $file['modified'][$i]) . '">' . truncate_text($file['name'][$i], 30) . '</td>';
}
echo '<td>' . bytestostring($file['size'][$i], 1) . '</td><td>' . $file['type'][$i] . '</td>' . '<td>';
form_hidden_input('actionfile[' . $i . ']', $file['name'][$i]);
switch ($actionnow) {
case 'delete':
echo '<input class="del" type="checkbox" name="deletefile[' . $i . ']" value="1" />';
break;
case 'rename':
$ext = '.' . end(explode('.', $file['name'][$i]));
form_hidden_input('renameext[' . $i . ']', $ext);
form_text_input('renamefile[' . $i . ']', false, basename($file['name'][$i], $ext), 30, 120);
echo $ext;
break;
case 'resize':
form_text_input('resizefile[' . $i . ']', false, '', 4, 4);
form_select($selectresize, 'resizetype[' . $i . ']', false, '', false);
break;
示例3: bytestostring
<fieldset>
<legend><?php
echo TXT_UPLOAD_TO;
?>
: <?php
echo $xdir;
?>
</legend>
<form action="do_upload.php" method="post" enctype="multipart/form-data" target="upload_iframe" onSubmit="javascript:do_upload();">
<?php
echo TXT_SELECT_FILE . " (" . bytestostring($ezfilemanager['maxsize'][$_GET['type']]) . ")";
?>
<br />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php
echo $ezfilemanager['maxsize'][$_GET['type']];
?>
">
<input type="file" name="filename" id="filename" class='fieldtext' style='width:250px' />
<input type='hidden' name='type' id='type' value='<?php
echo $_GET['type'];
?>
' />
<br />
<input type='hidden' name='upload_path' id='upload_path' value='<?php
echo WORKING_PATH;
?>
' />
<input type="submit" value="<?php
echo TXT_UPLOAD;