admin/fckeditor/editor/plugins/RemoteImageRubber/remoteimagerubber.aspx
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Implements Interface="System.Web.UI.ICallbackEventHandler" %>
<script runat="server">
/// <summary>
/// 保存目录
/// </summary>
private string savePath = null;
private const string DEFAULT_USER_FILES_PATH = "/uppic/";
/// <summary>
/// 此处配置允许下载的文件扩展名
/// <remarks>
/// 暂未考虑使用动态网页输出的图片如:http://site/image.aspx?uid=00001 这样的URI;
/// 若要实现此功能可读取流并判断ContentType,将流另存为相应文件格式即可。
/// </remarks>
/// </summary>
private static readonly string[] allowImageExtension = new string[] { ".jpg", ".jpeg", ".png", ".gif", ".bmp" };
/// <summary>
/// 此处配置本地(网站)主机名
/// </summary>
private string[] localhost;
private string localImageSrc = string.Empty;
private void Page_Load(object obj, EventArgs args)
{
#region 得到FckEditor配置的上传路径
savePath = (string)Application["FCKeditor:UserFilesPath"];
// Try to get from the "Session".
if (savePath == null || savePath.Length == 0)
{
savePath = (string)Session["FCKeditor:UserFilesPath"];
// Try to get from the Web.config file.
if (savePath == null || savePath.Length == 0)
{
savePath = System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"];
// Otherwise use the default value.
if (savePath == null || savePath.Length == 0)
savePath = DEFAULT_USER_FILES_PATH;
// Try to get from the URL.
if (savePath == null || savePath.Length == 0)
{
savePath = Request.QueryString["ServerPath"];
}
}
}
// Check that the user path ends with slash ("/")
if (!savePath.EndsWith("/"))
savePath += "/";
#endregion
localhost = new string[] { "localhost", "127.0.0.1", Request.Url.Host };
if (!Page.IsPostBack)
后面还有 334 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
