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只能是相对路径或虚拟路径