404 pseudo-static functions

Source: Internet
Author: User

 

<% '404 pseudo-static dedicated function class html404 private regurl, URL 'function: Get protocol public property get pertrol () pertrol = searchstr (2) end property' function: get domain name public property get domain () domain = searchstr (4) end property 'function: Get Port Public Property get port () Port = searchstr (6) end property' function: obtain the Public Property get path () Path = searchstr (9) end property '. function: Obtain the Public Property get strings () strings = searchstr (11) en D property: Get the Public Property get fname () dim Bary if instr (searchstr (9), "/")> 0 then Bary = Split (searchstr (9 ), "/") fname = Bary (ubound (Bary) else fname = searchstr (9) end if end property private sub class_initialize () regurl = "(HTTP | FTP | https) \: \/) ([^ \ s \:\? \/] +) (\ :( [\ D] + ))? (\/([^ \ S \?] + )? (\? ([^ \ S] + ))?)?)?)? "Url = Split (request. querystring, ";") (1) end sub private sub class_terminate () end sub private function searchstr (INDEX) dim objregexp set objregexp = new Regexp objregexp. ignorecase = true objregexp. global = true objregexp. pattern = regurl searchstr = objregexp. replace (URL, "{1} quot; & Index) set objregexp = nothing end function ': matches the Regular Expression and returns the URL after the replacement. 'parameter: source, the string to be searched; regfrom, the regular expression to be matched; regto, the word to be matched String public function ISAPI (byval source, byval regfrom, byval regto) dim objregexp, match, matches set objregexp = new Regexp dim STR: Str = source objregexp. ignorecase = true objregexp. global = true objregexp. pattern = regfrom STR = objregexp. replace (STR, regto) set objregexp = nothing ISAPI = STR end function 'function: Obtain the function getstring (INDEX) dim STR = Split (fname ,". ") (0) If instr (STR," _ ")> 0 T Required getstring = Split (STR, "_") (INDEX) else getstring = "" end if end function "function: obtains the number of parameters. Function vcount () is separated () dim STR = Split (fname ,". ") (0) If instr (STR," _ ")> 0 then vcount = ubound (split (STR ,"_")) else vcount = 0 end if end function' function: Jump to URL public function redir (URL, DESC) response after an error occurs. write & "<! Doctype HTML public ""-// W3C // dtd xhtml 1.0 transitional // en "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "& vbcrlf & _" <HTML xmlns = "" http://www.w3.org/1999/xhtml" "XML: lang = "" ZH-CN "" lang = "" ZH-CN ""> "& vbcrlf & _" 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.