偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

MySQL數(shù)據(jù)庫(kù)來支持簡(jiǎn)單的圖形計(jì)數(shù)器

數(shù)據(jù)庫(kù) MySQL
我們今天要和大家一起分享的是用MySQL數(shù)據(jù)庫(kù)與GD來對(duì)簡(jiǎn)單的圖形計(jì)數(shù)器進(jìn)行支持的實(shí)際操作步驟,下面就是文章的主要內(nèi)容描述。

此文章主要向大家描述的是針對(duì)簡(jiǎn)單的圖形計(jì)數(shù)器,我們?nèi)绾斡?a >MySQL數(shù)據(jù)庫(kù)與GD來對(duì)其進(jìn)行支持的實(shí)際操作,以下的文章我是從一信譽(yù)度很好的網(wǎng)站上看見的,相信以下的文章會(huì)對(duì)很多人都會(huì)有所幫助。

<?php

hit_count表只一個(gè)字段hit_count

page_visit_record表是用來控制一個(gè)IP一天內(nèi)只產(chǎn)生一個(gè)計(jì)數(shù)器跳動(dòng)

  1. CREATE TABLE page_visit_record (  
  2. visit_time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,  
  3. remote_addr char(15) NOT NULL,  
  4. visit_page char(60) NOT NULL,  
  5. KEY visit_time (visit_time, visit_page),  
  6. Prima(最完善的虛擬主機(jī)管理系統(tǒng))RY KEY (visit_time)  
  7. );  
  8. ***/  
  9. include("config.inc.php3");  
  10. $query="select count(*) as tong from page_visit_record where remote_addr='$REMOTE_ADDR' and date_format(visit_time,'%Y-%m-%d')=curdate()";  
  11. $result=@MySQL(和PHP搭配之***組合)_query($query,$dbconnect);  
  12. $has_count=@MySQL(和PHP搭配之***組合)_result($result,0,"tong");  
  13. @MySQL(和PHP搭配之***組合)_query("lock tables hit_count write",$dbconnect);  
  14. $query="select * from hit_count";  
  15. $result=@MySQL(和PHP搭配之***組合)_query($query,$dbconnect);  
  16. if(@MySQL(和PHP搭配之***組合)_num_rows($result)>0){  
  17. $cur_count=@MySQL(和PHP搭配之***組合)_result($result,0,"hit_count");  
  18. if($has_count==0){  
  19. $cur_count++;  
  20. $query="update hit_count set hit_count='$cur_count'";  
  21. @MySQL(和PHP搭配之***組合)_query($query,$dbconnect);  
  22. }  
  23. @MySQL(和PHP搭配之***組合)_query("unlock tables",$dbconnect);  
  24. }  
  25. else{  
  26. $cur_count=1;  
  27. $query="insert into hit_count (hit_count) values ('$cur_count')";  
  28. @MySQL(和PHP搭配之***組合)_query($query,$dbconnect);  
  29. @MySQL(和PHP搭配之***組合)_query("unlock tables",$dbconnect);  
  30. }  
  31. while(strlen($cur_count)<8)  
  32. $cur_count="0$cur_count";  
  33. $visit_time=date("Y-m-d H:i:s");  
  34. $query="insert into page_visit_record (visit_time,remote_addr,visit_page) values ('$visit_time','$REMOTE_ADDR','$page')";  
  35. @MySQL(和PHP搭配之***組合)_query($query,$dbconnect);  
  36. Header("Content-type: image/gif");  
  37. $im = imagecreate(56,16);  
  38. $black = ImageColorAllocate($im, 0,0,0);  
  39. $blue = ImageColorAllocate($im, 0,0,255);  
  40. $white = ImageColorAllocate($im, 255,255,255);  
  41. $yellow = ImageColorAllocate($im, 255,255,0);  
  42. imagerectangle($im, 0, 0, 54, 14, $blue);  
  43. //imagestring($im, 2, 4, 1, $cur_count, $yellow);  
  44. imagestring($im, 2, 4, 1, $cur_count, $yellow);  
  45. ImageGif($im);  
  46. ImageDestroy($im);  
  47. ?> 

以上的相關(guān)內(nèi)容就是對(duì)簡(jiǎn)單的圖形計(jì)數(shù)器需要MySQL,GD的支持的介紹,望你能有所收獲。

【編輯推薦】

  1. MySQL鏡像數(shù)據(jù)庫(kù)的正確建立在linux之下
  2. MySQL全文搜索索引的字段作用
  3. MySQL數(shù)據(jù)庫(kù)與表的最基本命令大盤點(diǎn)
  4. MySQL啟動(dòng)方案匯總
  5. 453 h安裝在MySQL 4.1的亂碼問題
責(zé)任編輯:佚名 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-06-03 09:49:13

2010-07-15 15:50:58

安裝SQL Serve

2022-08-29 19:51:58

CSS計(jì)數(shù)器

2015-06-23 13:56:30

數(shù)據(jù)庫(kù)設(shè)計(jì)面向?qū)ο?/a>

2023-08-08 08:01:22

微服務(wù)架構(gòu)服務(wù)

2024-03-04 08:53:50

海量數(shù)據(jù)計(jì)數(shù)器存儲(chǔ)

2009-11-06 16:59:26

WCF性能計(jì)數(shù)器

2023-07-28 08:15:27

PC程序計(jì)數(shù)器

2017-11-27 06:01:37

數(shù)據(jù)庫(kù)中間件中間層

2017-11-30 08:56:14

數(shù)據(jù)庫(kù)中間件架構(gòu)師

2009-11-25 15:07:39

PHP添加計(jì)數(shù)器

2009-06-11 16:27:18

科學(xué)型Java計(jì)數(shù)器

2024-02-07 12:32:00

重構(gòu)技巧PythonCounter

2011-03-21 17:00:23

MySQL數(shù)據(jù)庫(kù)

2011-03-31 17:02:19

MySQL數(shù)據(jù)庫(kù)遠(yuǎn)程連接

2010-05-14 11:04:17

連接MySQL

2011-04-06 09:09:17

MySQL數(shù)據(jù)庫(kù)備份

2019-01-02 09:30:59

MySQL數(shù)據(jù)庫(kù)日志審計(jì)

2010-02-22 16:34:17

WCF性能計(jì)數(shù)器

2009-10-29 11:47:15

ADO.NET計(jì)數(shù)器b
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)