當前位置: 首頁>>代碼示例>>PHP>>正文


PHP makeSize函數代碼示例

本文整理匯總了PHP中makeSize函數的典型用法代碼示例。如果您正苦於以下問題:PHP makeSize函數的具體用法?PHP makeSize怎麽用?PHP makeSize使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了makeSize函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: date

"/>
                <input type="hidden" class="size" value="<?php 
                echo $file_array['size'];
                ?>
"/>
                <input type="hidden" class="extension" value="<?php 
                echo $extension_lower;
                ?>
"/>
                <input type="hidden" class="name" value=""/>
                <div class="file-date"><?php 
                echo date(lang_Date_type, $file_array['date']);
                ?>
</div>
                <div class="file-size"><?php 
                echo makeSize($file_array['size']);
                ?>
</div>
                <div class='img-dimension'><?php 
                if ($is_img) {
                    echo $img_width . "x" . $img_height;
                }
                ?>
</div>
                <div class='file-extension'><?php 
                echo $extension_lower;
                ?>
</div>
                <figcaption>
                    <form action="force_download.php" method="post" class="download-form" id="form<?php 
                echo $nu;
開發者ID:PotsonHumer,項目名稱:OGS_V2,代碼行數:31,代碼來源:dialog.php

示例2: date

"/>
                <input type="hidden" class="size" value="<?php 
                echo $size;
                ?>
"/>
                <input type="hidden" class="extension" value="<?php 
                echo $file_ext;
                ?>
"/>
                <input type="hidden" class="name" value=""/>
                <div class="file-date"><?php 
                echo date(lang_Date_type, $date);
                ?>
</div>
                <div class="file-size"><?php 
                echo makeSize($size);
                ?>
</div>
                <div class='img-dimension'><?php 
                if ($is_img) {
                    echo $img_width . "x" . $img_height;
                }
                ?>
</div>
                <div class='file-extension'><?php 
                echo $file_ext;
                ?>
</div>
                <figcaption>
                    <form action="force_download.php" method="post" class="download-form" id="form<?php 
                echo $nu;
開發者ID:hnlam1986,項目名稱:TheGioiSanKhau,代碼行數:31,代碼來源:dialog.php

示例3: if

                    </div>
                </div>
                <?php if($is_icon_thumb){ ?>
                <div class="cover"></div>
                <?php } ?>
                </a>	
                <div class="box">				
                <h4 class="<?php if($ellipsis_title_after_first_row){ echo "ellipsis"; } ?>"><a href="javascript:void('')" class="link" data-file="<?php echo $file; ?>" data-field_id="<?php echo $field_id; ?>" data-function="<?php echo $apply; ?>">
                <?php echo $filename; ?></a> </h4>
                </div>
                <input type="hidden" class="date" value="<?php echo $file_array['date']; ?>"/>
                <input type="hidden" class="size" value="<?php echo $file_array['size'] ?>"/>
                <input type="hidden" class="extension" value="<?php echo $extension_lower; ?>"/>
                <input type="hidden" class="name" value=""/>
                <div class="file-date"><?php echo date(lang_Date_type,$file_array['date'])?></div>
                <div class="file-size"><?php echo makeSize($file_array['size'])?></div>
                <div class='img-dimension'><?php if($is_img){ echo $img_width."x".$img_height; } ?></div>
                <div class='file-extension'><?php echo $extension_lower; ?></div>
                <figcaption>
                    <form action="force_download.php" method="post" class="download-form" id="form<?php echo $nu; ?>">
                    <input type="hidden" name="path" value="<?php echo $rfm_subfolder.$subdir?>"/>
                    <input type="hidden" class="name_download" name="name" value="<?php echo $file?>"/>
                    
                    <a title="<?php echo lang_Download?>" class="tip-right" href="javascript:void('')" onclick="$('#form<?php echo $nu; ?>').submit();"><i class="icon-download"></i></a>
                    <?php if($is_img && $src_thumb!=""){ ?>
                    <a class="tip-right preview" title="<?php echo lang_Preview?>" data-url="<?php echo $src;?>" data-toggle="lightbox" href="#previewLightbox"><i class=" icon-eye-open"></i></a>
                    <?php }elseif(($is_video || $is_audio) && in_array($extension_lower,$jplayer_ext)){ ?>
                    <a class="tip-right modalAV <?php if($is_audio){ echo "audio"; }else{ echo "video"; } ?>"
                    title="<?php echo lang_Preview?>" data-url="ajax_calls.php?action=media_preview&title=<?php echo $filename; ?>&file=<?php echo $current_path.$rfm_subfolder.$subdir.$file;; ?>"
                    href="javascript:void('');" ><i class=" icon-eye-open"></i></a>
                    <?php }else{ ?>
開發者ID:hendryguna,項目名稱:laravel-basic,代碼行數:31,代碼來源:dialog.php

示例4: get_uploaded_files_markup


//.........這裏部分代碼省略.........
                $date = filemtime($file_path);
                $size = filesize($file_path);
                // $file_ext = substr(strrchr($file, '.'), 1);
                $file_infos = pathinfo($file_path);
                $file_ext = $file_infos['extension'];
                // $sorted[$k] = array('file' => $file, 'date' => $date, 'size' => $size, 'extension' => $file_ext);
                $extension_lower = fix_strtolower($file_ext);
                $is_img = true;
                list($img_width, $img_height, $img_type, $attr) = getimagesize($file_path);
                // if (++$num % 4 === 1):
                ?>
<li data-image="<?php 
                echo $filename;
                ?>
" data-large="<?php 
                echo $upload_dir . $img;
                ?>
" data-medium="<?php 
                echo $upload_dir . $img;
                ?>
" data-thumb="<?php 
                echo $upload_dir . $img;
                ?>
" class="ff-item-type-2 file">
        <figure data-type="img" data-name="1117858_1577750_graph-1024x1024.png">
            <a data-function="apply" data-field_id="" data-file="<?php 
                echo $upload_dir . $img;
                ?>
" class="link" href="javascript:void('')">
                <div class="img-precontainer">
                                        <div class="img-container">
                        <span></span>
                        <img alt="<?php 
                echo $img;
                ?>
" src="<?php 
                echo $upload_dir . $img;
                ?>
"  class="original "  >
                    </div>
                </div>
                <div class="img-precontainer-mini original-thumb">
                    <div class="filetype png hide">png</div>
                    <div class="img-container-mini">
                        <span></span>
                        <img src="<?php 
                echo $upload_dir . $img;
                ?>
" class=" " alt="<?php 
                echo $img;
                ?>
 thumbnails">
                                            </div>
                </div>
                            </a>
            <div class="box">
                <h4 class="ellipsis">
                    <a data-function="apply" data-field_id="" data-file="<?php 
                echo $img;
                ?>
" class="link" href="javascript:void('')">
                        <?php 
                echo $img;
                ?>
</a></h4>
            </div>
            <?php 
                $date = filemtime($current_path . $img);
                ?>
            <input type="hidden" class="date" value="<?php 
                echo $date;
                ?>
"/>
            <input type="hidden" class="size" value="<?php 
                echo $size;
                ?>
"/>
            <input type="hidden" class="extension" value="<?php 
                echo $extension_lower;
                ?>
"/>
            <input type="hidden" class="name" value=""/>
            <div class="file-date"><?php 
                echo date(lang_Date_type, $date);
                ?>
</div>
            <div class="file-size"><?php 
                echo makeSize($size);
                ?>
</div>
            <div class='img-dimension'><?php 
                if ($is_img) {
                    echo $img_width . "x" . $img_height;
                }
                ?>
</div>
            <div class='file-extension'><?php 
                echo Tools::safeOutput($extension_lower);
                ?>
</div>
開發者ID:evgrishin,項目名稱:se1614,代碼行數:101,代碼來源:base_admin.class.php


注:本文中的makeSize函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。