a亚洲精品_精品国产91乱码一区二区三区_亚洲精品在线免费观看视频_欧美日韩亚洲国产综合_久久久久久久久久久成人_在线区

首頁 > 編程 > JSP > 正文

jsp計數(shù)器代碼

2024-09-05 00:20:49
字體:
供稿:網(wǎng)友
<!--
JSP-Hitcounter counts sessions.
Copyright (C) 2000 Jesper Schmitz Mouridsen.
Visit www.webappcabaret/jsm2/webapps.jsp?find=jsphcs for more info.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.opensource.org/licenses/gpl-license.html for more details
-->


<%

BufferedReader inf = new BufferedReader(new FileReader("/path/to/counter.txt"));
int tmp = Integer.parseInt(inf.readLine());
int i=0;

try {

i = Integer.parseInt(request.getSession().getValue("tal").toString());
} catch (NullPointerException t) {i=0; }

if (i==0) {
tmp++;

PrintWriter outf = new PrintWriter(new BufferedWriter(new FileWriter("/path/to/counter.txt")));
outf.println(tmp);
outf.close();
inf.close();
request.getSession().putValue("tal", "1");
}

BufferedReader inf2 = new BufferedReader(new FileReader("/path/to/counter.txt"));
%>
<%
String zeroes="";
String hits = inf2.readLine();
inf2.close();
for (int t=0; t < 8-hits.length(); t++) {
zeroes=zeroes+"0"; }
out.println(zeroes + hits);
%>
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 免费欧美一级 | 午夜在线观看视频网站 | 免费av大全| 欧美日韩一区二区视频在线观看 | 99国内精品久久久久久久 | 极品在线视频 | 亚洲欧美在线观看 | 欧洲精品 | 综合色视频 | 国产91亚洲 | 羞羞小视频在线观看 | 欧美精品久久久久久久宅男 | 日日射av| 亚洲乱码国产乱码精品精 | 亚洲一级性生活片 | 日中文字幕在线 | 成人免费视频网站在线观看 | 国产在线不卡视频 | 免费国产一区二区 | 国产日本亚洲欧美 | 国产成人精品av | 欧美一区二区三区免费电影 | 久久午夜视频 | 激情视频网站 | 日韩高清国产一区在线 | 午夜精品久久久久久久 | 亚洲精品在线免费 | 亚洲精品二区 | 亚洲精品久久久久久下一站 | 免费的一级黄色片 | 久久夜夜爽 | 欧美三级电影在线观看 | 国产精品久久久久久久久免费 | 天堂视频在线 | 99久久免费精品国产男女性高好 | 日本中文字幕在线观看 | 亚洲久草 | 日韩综合网 | 激情欧美一区 | 极品毛片 | 久久伊人av |