<%
BufferedReader test;
test=new BufferedReader(new FileReader("d:/ja/count1.txt"));
String tmp=null;
int i=0;
try
{
tmp=test.readLine();
}
catch(IOException e)
{
out.print("读取数据库错误");
}
if(tmp==null)
{
i=1;
}
else
{
i=Integer.parseInt(tmp)+1;
}
try
{
PrintWriter outf=new PrintWriter(new FileOutputStream("d:/ja/count1.txt"));
outf.println(i);
outf.close();
}
catch(IOException e)
{
out.print(e.getMessage());
}
test.close();
%>
BufferedReader test;
test=new BufferedReader(new FileReader("d:/ja/count1.txt"));
String tmp=null;
int i=0;
try
{
tmp=test.readLine();
}
catch(IOException e)
{
out.print("读取数据库错误");
}
if(tmp==null)
{
i=1;
}
else
{
i=Integer.parseInt(tmp)+1;
}
try
{
PrintWriter outf=new PrintWriter(new FileOutputStream("d:/ja/count1.txt"));
outf.println(i);
outf.close();
}
catch(IOException e)
{
out.print(e.getMessage());
}
test.close();
%>
解决方案 »
- 怎么样讲vector的数据通过copyInto输出到二维数组
- 使用jxl读取含有数据有效性设置的excel文件问题
- 初学者的困惑,学习Java可以用在什么地方???
- 请问:把数据库驱动empressJDBC_cat4.jar打包进client.jar,运行client.jar找不到数据库驱动,为啥?
- 请问有人能以一个简单的例子,说明一下组合的作用吗?
- 写了个很冤枉的程序
- 菜鸟问题“包的导入”
- 2003月07月06日升星,散分500!--分五天结贴之第二帖。(次日凌晨零点结分)
- 关于异常的捕获
- 奇怪,为什么不能退出程序???????????????
- GridLayout 中控件的删除
- JAVA APPLET如何读取非本地XML文件?
this page has been visited <b>${applicationScope.counter}</b>times