DtCms.Web.Tools.Http_ImgLoad.ashx.cs
时间:2011-04-27 来源:xiyang120
using System; using System.Web; using DtCms.Common; using System.IO; namespace DtCms.Web.Tools { /// <summary> /// 显示缩略图 /// </summary> public class Http_ImgLoad : IHttpHandler { public void ProcessRequest(HttpContext context) { int strW; int strH; if (int.TryParse(context.Request.Params["w"], out strW) && int.TryParse(context.Request.Params["h"], out strH)) { context.Response.Clear(); string gurl = context.Request.Params["gurl"]; if (!string.IsNullOrEmpty(gurl)) { if (File.Exists(context.Server.MapPath(gurl))) { LoadImage.GenThumbnail(context.Request.Params["gurl"], strW, strH); } else { LoadImage.GenThumbnail("/images/nopic.gif", strW, strH); } } else { LoadImage.GenThumbnail("/images/nopic.gif", strW, strH); } } } public bool IsReusable { get { return false; } } } }
相关阅读 更多 +
- 系统休眠文件删除后果 如何删除计算机的休眠文件 2025-04-22
- 站群服务器是什么意思 站群服务器的作用 站群服务器和普通服务器的区别 2025-04-22
- jQuery插件有何作用 jQuery插件的使用方法 2025-04-22
- jQuery插件有哪些种类 简单的jQuery插件实例 2025-04-22
-