Song.Site/Check/Writer.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using WeiSha.Common;
namespace Song.Site.Check
{
public partial class Writer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnWriter_Click(object sender, EventArgs e)
{
//默认上传文件夹
string phy = WeiSha.Common.Upload.Get.Root.Physics;
string file = phy + "test.txt";
try
{
if (File.Exists(file)) File.Delete(file);
StreamWriter sw = new StreamWriter(phy + "test.txt");
sw.WriteLine("测试写入权限所生成的文件");
sw.WriteLine(DateTime.Now.ToString());
sw.Close();
if (File.Exists(file)) File.Delete(file);
plError.Visible = false;
lbScuess.Visible = true;
}
catch (Exception ex)
{
ltError.Text = ex.Message;
plError.Visible = true;
lbScuess.Visible = false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
