drawcirclesegments.php

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 30 行

PHP
30
字号
<?php 
require_once 'HTML/Progress.php';

$bar = new HTML_Progress(HTML_PROGRESS_CIRCLE);

$ui =& $bar->getUI();
$ui->setStringAttributes('background-color=#eeeeee');
$ui->setCellAttributes(array(
    'width' => 50,
    'height' => 50,
    'spacing' => 0,
    'background-color' => '#EEEEEE'
    ));

$dir = '../temp';
$fmask = 'c%s.png';

if (file_exists("$dir/c0.png")) {
    // uses cached files rather than create it again and again
    foreach (range(0,10) as $index) {
        $ui->setCellAttributes(
            array('background-image' => sprintf($dir.$fmask, $index)),
            $index
            );
    }
} else {
    // creates circle segments pictures only once
    $ui->drawCircleSegments($dir, $fmask);
}
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?