微信幸运九宫格抽奖源码/51wsb_wxjgg/admin/upload.ashx.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace wxjgg.admin
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class upload : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //不让浏览器缓存
            context.Response.Buffer = true;
            context.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
            context.Response.AddHeader("pragma", "no-cache");
            context.Response.AddHeader("cache-control", "");
            context.Response.CacheControl = "no-cache";
            context.Response.ContentType = "text/html;charset=UTF-8";

            //获取form表单参数
            HttpPostedFile file = context.Request.Files[0];
            //业务逻辑操作
            System.Drawing.Image imgFullSize = System.Drawing.Image.FromStream(file.InputStream);


            int maxwidth = Convert.ToInt32(context.Request["maxwidth"]);
            int maxheight = Convert.ToInt32(context.Request["maxheight"]);
            string saveimg = "upfile/" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + ".jpg";


            try
            {
                imgphoto.oldurlImg11(context.Server.MapPath("/" + saveimg), imgFullSize, maxwidth, maxheight, "A");
                context.Response.Write(saveimg);
            }
            catch
            {
                context.Response.Write("0");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
后面还有 1 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。