YKT_Common/HTTPS.cs

(开头部分) 6KB

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

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace YKT_Common
{
    /// <summary>
    /// 网站Http请求
    /// </summary>
    public class HTTPS
    {
        /// <summary>
        /// 获取网站上一页地址
        /// </summary>
        public static string ComeUrl
        {
            get { return System.Web.HttpContext.Current.Request.UrlReferrer.ToString(); }
        }

        /// <summary>
        /// 获取网站绝对地址
        /// </summary>
        public static string SiteUrl
        {
            get
            {
                if (System.Web.HttpContext.Current.Request.Url.Port == 80)
                {
                    return "http://" + System.Web.HttpContext.Current.Request.Url.Host + System.Web.HttpContext.Current.Request.ApplicationPath;
                }
                return "http://" + System.Web.HttpContext.Current.Request.Url.Host + ":" + System.Web.HttpContext.Current.Request.Url.Port + System.Web.HttpContext.Current.Request.ApplicationPath;
            }
        }

        /// <summary>
        /// 获取站点物理路径
        /// </summary>
        public static string PhyPath
        {
            get { return HttpContext.Current.Request.PhysicalApplicationPath; }
        }

        /// <summary>
        /// 获取应用程序的虚拟根路径
        /// </summary>
        public static string VisPath
        {
            get { return HttpContext.Current.Request.ApplicationPath; }
        }

        public static string GetPathNoParams
        {
            get { return HttpContext.Current.Request.RawUrl; }
        }

        /// <summary>
        /// 穿过代理服务器取远程用户真实IP地址
        /// </summary>
        public static string GetIP
后面还有 153 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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