<pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

          <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

          <p id="bbfd9"></p>

          <p id="bbfd9"><cite id="bbfd9"></cite></p>

            <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

            <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
            <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>

            如何做出PHP數據餅圖

            時間:2025-11-24 04:15:24 php語言

            如何做出PHP數據餅圖

              用PHP做出的動態頁面與其他的編程語言相比,PHP是將程序嵌入到HTML(標準通用標記語言下的一個應用)文檔中去執行,執行效率比完全生成HTML標記的CGI要高許多;PHP還可以執行編譯后代碼,編譯可以達到加密和優化代碼運行,使代碼運行更快。下面是小編為大家搜索整理的如何做出PHP數據餅圖,希望大家能有所收獲,更多精彩內容請及時關注我們應屆畢業生考試網!

              源代碼:

              /pic/p>

              /pic/pic/p>

              /pic/p>

              define("ANGLE_STEP", 5); /pic/p>

              function draw_getdarkcolor($img,$clr) /pic/p>

              {

              $rgb = imagecolorsforindex($img,$clr);

              return array($rgb["red"]/2,$rgb["green"]/2,$rgb["blue"]/2);

              }

              function draw_getexy($a, $b, $d) /pic/p>

              {

              $d = deg2rad($d);

              return array(round($a*Cos($d)), round($b*Sin($d)));

              }

              function draw_arc($img,$ox,$oy,$a,$b,$sd,$ed,$clr) /pic/p>

              {

              $n = ceil(($ed-$sd)/ANGLE_STEP);

              $d = $sd;

              list($x0,$y0) = draw_getexy($a,$b,$d);

              for($i=0; $i<$n; $i++)

              {

              $d = ($d+ANGLE_STEP)>$ed?$ed:($d+ANGLE_STEP);

              list($x, $y) = draw_getexy($a, $b, $d);

              imageline($img, $x0+$ox, $y0+$oy, $x+$ox, $y+$oy, $clr);

              $x0 = $x;

              $y0 = $y;

              }

              }

              function draw_sector($img, $ox, $oy, $a, $b, $sd, $ed, $clr) /pic/p>

              {

              $n = ceil(($ed-$sd)/ANGLE_STEP);

              $d = $sd;

              list($x0,$y0) = draw_getexy($a, $b, $d);

              imageline($img, $x0+$ox, $y0+$oy, $ox, $oy, $clr);

              for($i=0; $i<$n; $i++)

              {

              $d = ($d+ANGLE_STEP)>$ed?$ed:($d+ANGLE_STEP);

              list($x, $y) = draw_getexy($a, $b, $d);

              imageline($img, $x0+$ox, $y0+$oy, $x+$ox, $y+$oy, $clr);

              $x0 = $x;

              $y0 = $y;

              }

              imageline($img, $x0+$ox, $y0+$oy, $ox, $oy, $clr);

              list($x, $y) = draw_getexy($a/2, $b/2, ($d+$sd)/2);

            【如何做出PHP數據餅圖】相關文章:

            PHP如何創建數據庫12-20

            PHP如何插入數據庫03-09

            如何在PHP導出excel格式數據11-26

            PHP如何使用curl實現數據抓取02-05

            php如何連接數據庫09-21

            如何實現PHP獲取表單數據與HTML嵌入PHP腳本01-16

            如何在PHP中處理Protocol Buffers數據11-29

            如何使用php獲取excel文件數據08-26

            php如何基于dom實現圖書xml格式數據02-27

                    <pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

                    <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

                    <p id="bbfd9"></p>

                    <p id="bbfd9"><cite id="bbfd9"></cite></p>

                      <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

                      <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
                      <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
                      飘沙影院