最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
fckeditor文件上传路径修改方法
时间:2011-08-15 编辑:简简单单 来源:一聚教程网
VS打开FCK项目,打开文件“FCKeditor.Net_2.6.3FileBrowserFileWorkerBase.cs”
找到这行
C# code
// Map the virtual path to the local server path.
string sServerDir = this.ServerMapFolder( resourceType, currentFolder, isQuickUpload );
//如果不关心按类型存放文件的话,FCK把类型分为image,media,flash,file
//直接修改成这样
string sServerDir = "d:somedir"; //注意这个目录必须给ASP.net读写权限
修改完成后重新编译整个项目,然后把重新生成的FredCK.FCKeditorV2.dll拷贝到你的网站中
以下这个方法可以上传保存,但显示会有问题,因为路径不对:
定位到文件“fckeditoreditorfilemanagerconnectorsasp教程xconfig.ascx”并打开它,找到下面这个片段,按我标注的注释改
C# code
// URL path to user files.
UserFilesPath = "/uploadfiles/";// The connector tries to resolve the above UserFilesPath automatically.
// Use the following setting it you prefer to explicitely specify the
// absolute path. Examples: 'C:MySiteuserfiles' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' URL must point to the same directory.
UserFilesAbsolutePath = "";
//把上面的“UserFilesAbsolutePath”修改为你自己的物理路径,
//但这样的话在网站里访问上传的文件就有问题了,你试下便知
//注意最后一句注释“Attention: The above 'UserFilesPath' URL must point to the same directory.”
//“UserFilesPath”和“UserFilesAbsolutePath”必须指向相同的文件夹,
//而且UserFilesPath只能是相对路径或虚拟路径
-
上一个: .NET 有效的防止资源被盗链下载
-
下一个: .net正则出字符串中指定内容
相关文章
- C#复制数组的两种方式及效率比较解读 10-24
- ASP.NET Identity用法解析 10-24
- ASP.NET MVC使用Identity增删改查用户介绍 10-24
- C语言中atoi函数模拟实现介绍 10-18
- .Net反向代理组件Yarp用法介绍 10-10
- .NET使用YARP通过编码方式配置域名转发实现反向代理教程 10-10