zoukankan      html  css  js  c++  java
  • 判断是否是IE里直接输入地址

    Sub CheckComeUrl()
        Dim ComeUrl, TrueSiteUrl, cUrl
        ComeUrl = Trim(Request.ServerVariables("HTTP_REFERER"))
        TrueSiteUrl = Trim(Request.ServerVariables("HTTP_HOST"))
        If ComeUrl = "" Then
            Response.Write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
            Call WriteEntry(1, "", "直接地址输入访问后台")
            Response.End
        Else
            cUrl = Trim("http://" & TrueSiteUrl) & ScriptName
            If LCase(Left(ComeUrl, InStrRev(ComeUrl, "/"))) <> LCase(Left(cUrl, InStrRev(cUrl, "/"))) Then
                Response.Write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。</font></p>"
                Call WriteEntry(1, "", "外部链接访问后台")
                Response.End
            End If
        End If
    End Sub
  • 相关阅读:
    典型并发任务
    第九章使用共享变量实现并发
    第八章goroutine和通道
    第七章接口
    第六章方法
    第一章
    第四章复合数据类型
    第三章基础数据类型
    Django其他
    VUE学习日记(五) ---- 组件定义 component
  • 原文地址:https://www.cnblogs.com/saimisei/p/1278348.html
Copyright © 2011-2022 走看看