protected void Page_Load(object sender, EventArgs e)
{
string path = string.Format(@"d:\123.txt");//需要引入using System.IO;
if (File.Exists(path))
{
FileInfo fi = new FileInfo(path);
int l = Convert.ToInt32(fi.Length);
if (l == 0)
{
Response.Write("");
}
else
{
Response.Write("");
}
}
else
{
File.Create(path);
if (File.Exists(path))
{
Response.Write("");
}
else
{
Response.Write(""); }
}
}