Song.Site/Manage/Utility/UploadPath/FileExplorer.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Song.Site.Manage.Utility.UploadPath
{
    /// <summary>
    /// 文件资源管理
    /// </summary>
    public partial class FileExplorer : Extend.CustomPage
    {
        //上传文件的配置项,参照web.config中的Platform/Upload节点
        string pathkey = WeiSha.Common.Request.QueryString["path"].String;
        protected void Page_Load(object sender, EventArgs e)
        {
            //当前文件夹
            ltCuurentPath.Text = WeiSha.Common.Upload.Get[pathkey].Virtual;
            //物理路径
            string path = WeiSha.Common.Upload.Get[pathkey].Physics;
            System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(path);
            //下级文件夹
            System.IO.DirectoryInfo[] dirs = dir.GetDirectories();
            rptDirs.DataSource = dirs;
            rptDirs.DataBind();
            //下级文件
            System.IO.FileInfo[] files = dir.GetFiles();
            rptFiles.DataSource = files;
            rptFiles.DataBind();
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。