7. 使用例
最後に簡単に使用例を示します。
<?php
require('dbcnt.php');
$cid = dbc_open();
$cnt = dbc_update( $cid, 'test' );
dbc_close( $cid );
$total = $cnt[$dbcn_total];
$today = $cnt[$dbcn_today];
$yeday = $cnt[$dbcn_yeday];
echo "計:$total 今日:$today 昨日:$yeday";
?>
↑のようなスクリプトを書くと、現在のカウンターの値が↓のように出力されます。
計:1234 今日:56 昨日:78
DBCNT のスクリプトの全ソースは、左の「Downloads」メニューからダウンロードしてください。
[Page:
1 2 3 4 5 6 (7) ] →最初
|