1. 程式人生 > >CKEditor3.6.2+CKFinder2.1 上傳圖片

CKEditor3.6.2+CKFinder2.1 上傳圖片

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
 <CKEditor:CKEditorControl ID="editor1" BasePath="./ckeditor/" runat="server"></CKEditor:CKEditorControl>
 protected override void OnLoad(EventArgs e)
 {
     CKFinder.FileBrowser _FileBrowser = new
CKFinder.FileBrowser();
     _FileBrowser.BasePath = "/ckfinder/";
     _FileBrowser.SetupCKEditor(editor1);
 }

ckfinder/config.ascx

public override bool CheckAuthentication()
{
	//return false; 改這裡
   // return HttpContext.Current.User.Identity.IsAuthenticated; 更安全
    return true;
}

SetConfig():

	BaseUrl = "~/ckfinder/userfiles/
";