中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

將數(shù)據(jù)以圖片的形式輸出的PHP代碼

2018-07-20    來源:open-open

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬Linux鏡像隨意使用
<?php session_start(); include("conn/conn.php");
$query="select count(ip) as count_ip from tb_count04 ";
//查詢數(shù)據(jù)庫中總的IP訪問量
$result=mysql_query($query);
$countes=mysql_result($result,0,'count_ip');
 
//通過GD2函數(shù)創(chuàng)建畫布
$im=imagecreate(240,24);
$gray=imagecolorallocate($im,200,200,200);
$color =imagecolorallocate($im,rand(0,255),rand(0,255),rand(0,255));    //定義字體顏色
//輸出中文字符
$text=iconv("gb2312","utf-8","統(tǒng)計(jì)IP的數(shù)量:");
//對(duì)指定的中文字符串進(jìn)行轉(zhuǎn)換
$font = "fonts/FZHCJW.TTF";
imagettftext($im,14,0,20,18,$color,$font,$text);                        //輸出中文
//輸出網(wǎng)站的訪問次數(shù)
imagestring($im,5,160,5,$countes,$color);
imagepng($im);
imagedestroy($im);
?>

標(biāo)簽: Mysql 數(shù)據(jù)庫

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:PHP根據(jù)一個(gè)給定經(jīng)緯度的點(diǎn),進(jìn)行附近地點(diǎn)查詢

下一篇:JS拖拽效果