首页 / 网页编程 / ASP.NET / FCKEditor自定义用户目录(附源码)
FCKEditor自定义用户目录(附源码)2011-05-27 博客园 丘比特由于我这边的网络原因,没用从FCK的官网下载到源码...这套源码是FCK2.2版反编译出来的源码:点此下载 源码中主要修改的地方做了注释大致的修改如下 :获取用户目录的源码: FileWorkerBase.cs这里主要是做了一些注释在程序中可以直接在用户登录的时候指定这个方案只是方便多用户使用的时候为用户指定不同的文件目录Session["FCKeditor:UserFilesPath"]="用户文件相对目录";代码/// <summary>
/// 用户文件目录
/// </summary>
protected string UserFilesPath
{
get
{
if (this.sUserFilesPath == null)
{
//从APPlictaion 读取
this.sUserFilesPath = (string)base.Application["FCKeditor:UserFilesPath"];
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
//从Session读取
this.sUserFilesPath = (string)this.Session["FCKeditor:UserFilesPath"];
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
//从站点配 置文件读取
this.sUserFilesPath = ConfigurationSettings.AppSettings ["FCKeditor:UserFilesPath"];
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
this.sUserFilesPath = "/UpLoadFiles/";
}
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
// 从URL读取
this.sUserFilesPath = base.Request.QueryString["ServerPath"];
}
}
}
if (! this.sUserFilesPath.EndsWith("/"))
{
this.sUserFilesPath = this.sUserFilesPath + "/";
}
}
return this.sUserFilesPath;
}
}