一個簡單計數器的源代碼_PHP教程

WBOY
發布: 2016-07-21 16:02:49
原創
933 人瀏覽過


$memo_file="phpcount/vst.txt";
if ($phpxcount>>$REMOTE_ADDR){
$visits = file($memo_file);
$number_of_last_visit = $visits[0];
$number_of_new_visit = $number_of_last_visit;
$fp = fopen($memo_file, "w");
$fw = fwrite($fp, $number_of_new_visit);
fclose($fp);

$len_str = strlen($number_of_new_visit);
for($i=(0);$i$numbers_exploded = substr($number_of_new_visit,$i,1);
$output_str = $output_str 。
}
}else{
$visits = file($memo_file);
$number_of_last_visit = $visits[0];
$number_of_new_visit = $number_of_last_visit;
$fp = fopen($memo_file, "w");
$fw = fwrite($fp, $number_of_new_visit);
fclose($fp);

$len_str = strlen($number_of_new_visit);
for($i=(0);$i$numbers_exploded = substr($number_of_new_visit,$i,1);
$output_str = $output_str 。
}
}
echo $output_str;

http://www.bkjia.com/PHPjc/316438.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316438.htmlTechArticle? if ($phpxcount$REMOTE_ADDR){ $visits = 檔案($memo_file); $number_of_last_visit = $visits[0]; $number_of_new_visit = $number_of_last_visit; $fp = fop...
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板