{"id":67738,"date":"2017-02-20T01:58:20","date_gmt":"2017-02-19T17:58:20","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=67738"},"modified":"2017-02-26T02:01:32","modified_gmt":"2017-02-25T18:01:32","slug":"asp%e5%88%a4%e6%96%ad%e6%b5%8f%e8%a7%88%e5%99%a8%e5%92%8c%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2017\/02\/20\/67738.htm","title":{"rendered":"asp\u5224\u65ad\u6d4f\u89c8\u5668\u548c\u64cd\u4f5c\u7cfb\u7edf\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u7528ASP\u6765\u5224\u65ad\u7528\u6237\u6d4f\u89c8\u5668\u7c7b\u578b\u3001\u7248\u672c\u4ee5\u53ca\u64cd\u4f5c\u7cfb\u7edf\u7684\u7c7b\u578b\u548c\u7248\u672c\u3002<br \/>\n\u4ee3\u7801\u4e2d\u5305\u62ec\u4e24\u4e2a\u51fd\u6570\uff1aGetBrowser()\u4e3a\u6d4f\u89c8\u5668\u7c7b\u578b\u53ca\u7248\u672c\u68c0\u6d4b\uff0cgetsys()\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u7c7b\u578b\u53ca\u7248\u672c\u68c0\u6d4b\u3002<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"line_numbers\">\n<pre>1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n10\r\n11\r\n12\r\n13\r\n14\r\n15\r\n16\r\n17\r\n18\r\n19\r\n20\r\n21\r\n22\r\n23\r\n24\r\n25\r\n26\r\n27\r\n28\r\n29\r\n30\r\n31\r\n32\r\n33\r\n34\r\n35\r\n36\r\n37\r\n38\r\n39\r\n40\r\n41\r\n42\r\n43\r\n44\r\n45\r\n46\r\n47\r\n48\r\n49\r\n50\r\n51\r\n52\r\n53\r\n54\r\n55\r\n56\r\n57\r\n58\r\n59\r\n60\r\n61\r\n62\r\n63\r\n64\r\n65\r\n66\r\n67\r\n68\r\n69\r\n70\r\n71\r\n72\r\n73\r\n74\r\n75\r\n76\r\n77\r\n<\/pre>\n<\/td>\n<td class=\"code\">\n<pre class=\"asp\">&lt; %\r\n'\u64cd\u4f5c\u7cfb\u7edf\u68c0\u6d4b\r\nfunction getsys()\r\nvibo_soft=Request.ServerVariables(\"HTTP_USER_AGENT\")\r\nif instr(vibo_soft,\"Windows NT 5.0\") then\r\n    msm=\"Win 2000\"\r\nelseif instr(vibo_soft,\"Windows NT 5.1\") then\r\n    msm=\"Win XP\"\r\nelseif instr(vibo_soft,\"Windows NT 5.2\") then\r\n    msm=\"Win 2003\"\r\nelseif instr(vibo_soft,\"4.0\") then\r\n    msm=\"Win NT\"\r\nelseif instr(vibo_soft,\"NT\") then\r\n    msm=\"Win NT\"\r\nelseif instr(vibo_soft,\"Windows CE\") then\r\n    msm=\"Windows CE\"\r\nelseif instr(vibo_soft,\"Windows 9\") then\r\n    msm=\"Win 9x\"\r\nelseif instr(vibo_soft,\"9x\") then\r\n    msm=\"Windows ME\"\r\nelseif instr(vibo_soft,\"98\") then\r\n    msm=\"Windows 98\"\r\nelseif instr(vibo_soft,\"Windows 95\") then\r\n    msm=\"Windows 95\"\r\nelseif instr(vibo_soft,\"Win32\") then\r\n    msm=\"Win32\"\r\nelseif instr(vibo_soft,\"unix\") or instr(vibo_soft,\"linux\") or instr(vibo_soft,\"SunOS\") or instr(vibo_soft,\"BSD\") then\r\n    msm=\"\u7c7bUnix\"\r\nelseif instr(vibo_soft,\"Mac\") then\r\n    msm=\"Mac\"\r\nelse\r\n    msm=\"Other\"\r\nend if\r\ngetsys=msm\r\nEnd Function\r\n\u00a0\r\n'\u6d4f\u89c8\u5668\u7c7b\u578b\u53ca\u7248\u672c\u68c0\u6d4b\r\nfunction GetBrowser()\r\ndim vibo_soft\r\nvibo_soft=Request.ServerVariables(\"HTTP_USER_AGENT\")\r\nBrowser=\"unknown\"\r\nversion=\"unknown\"\r\n'vibo_soft=\"Mozilla\/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; .NET CLR 1.1.4322)\"\r\nIf Left(vibo_soft,7) =\"Mozilla\" Then '\u6709\u6b64\u6807\u8bc6\u4e3a\u6d4f\u89c8\u5668\r\n            vibo_soft=Split(vibo_soft,\";\")\r\n            If InStr(vibo_soft(1),\"MSIE\")&gt;0 Then\r\n                Browser=\"Microsoft Internet Explorer \"\r\n                version=Trim(Left(Replace(vibo_soft(1),\"MSIE\",\"\"),6))\r\n            ElseIf InStr(vibo_soft(4),\"Netscape\")&gt;0 Then\r\n                Browser=\"Netscape \"\r\n                tmpstr=Split(vibo_soft(4),\"\/\")\r\n                version=tmpstr(UBound(tmpstr))\r\n            ElseIf InStr(vibo_soft(4),\"rv:\")&gt;0 Then\r\n                Browser=\"Mozilla \"\r\n                tmpstr=Split(vibo_soft(4),\":\")\r\n                version=tmpstr(UBound(tmpstr))\r\n                If InStr(version,\")\") &gt; 0 Then\r\n                    tmpstr=Split(version,\")\")\r\n                    version=tmpstr(0)\r\n                End If\r\n            End If\r\nElseIf Left(vibo_soft,5) =\"Opera\" Then\r\n            vibo_soft=Split(vibo_soft,\"\/\")\r\n            Browser=\"Mozilla \"\r\n            tmpstr=Split(vibo_soft(1),\" \")\r\n            version=tmpstr(0)\r\nEnd If\r\nIf version&lt;&gt;\"unknown\" Then\r\n            Dim Tmpstr1\r\n            Tmpstr1=Trim(Replace(version,\".\",\"\"))\r\n            If Not IsNumeric(Tmpstr1) Then\r\n                version=\"unknown\"\r\n            End If\r\nEnd If\r\nGetBrowser=Browser &amp;\" \"&amp; version\r\nEnd function\r\n%&gt;<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7528ASP\u6765\u5224\u65ad\u7528\u6237\u6d4f\u89c8\u5668\u7c7b\u578b\u3001\u7248\u672c\u4ee5\u53ca\u64cd\u4f5c\u7cfb\u7edf\u7684\u7c7b\u578b\u548c\u7248\u672c\u3002 \u4ee3\u7801\u4e2d\u5305\u62ec\u4e24\u4e2a\u51fd\u6570\uff1aGetBrowser()\u4e3a\u6d4f\u89c8\u5668\u7c7b\u578b\u53ca\u7248\u672c\u68c0\u6d4b\uff0cgetsys()\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u7c7b\u578b\u53ca\u7248\u672c\u68c0\u6d4b\u3002 1 2 3 4 5 6 7 8 9 10 11 12 13 14 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[12],"topic":[],"class_list":["post-67738","post","type-post","status-publish","format-standard","hentry","category-htmlcss","category-technology","tag-asp"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=67738"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67738\/revisions"}],"predecessor-version":[{"id":67739,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67738\/revisions\/67739"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=67738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=67738"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=67738"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=67738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}