⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _incfunctions.asp

📁 Web Development Upload ASP Web Development Upload ASP Web Development Upload ASP
💻 ASP
字号:
 <%
'Gets the file name from the full path
Function GetFileFromPath(strPath)
 GetFileFromPath = Right(strPath, Len(strPath)-InStrRev(strPath,"/"))
end function

'This is the name of the script currently running
Dim sScriptName
sScriptName = GetFileFromPath(Request.ServerVariables("SCRIPT_NAME"))

'This is the global name of the script currently running
Dim sGlobalName
sGlobalName = "http://" & Request.ServerVariables("SERVER_NAME") &  Request.ServerVariables("url")

'This is the global url path of the script currently running
Dim sGlobalURL
sGlobalURL = Left( sGlobalName, InStrRev(sGlobalName,"/"))


'This is the script name without extension
Dim sBaseScriptName
sBaseScriptName = Left(sScriptName, InStrRev(sScriptName,".") - 1)

'This is the path location of the data files
Dim sPathData
	sPathData		= 	Request.ServerVariables("PATH_TRANSLATED")
	'sPathData		= fso.GetAbsolutePathName(sPath)
		
	sPathData		= Left( sPathData, InStrRev(sPathData, "\")-1 )
	'sPathData		= Left( sPathData, InStrRev(sPathData, "\")-1 )
		
	sPathData		= sPathData + "\Data\"

sURLredirect	= "ReceiveRedirect.asp"

%>

<SCRIPT LANGUAGE=JScript RUNAT=Server>
function y2k(number)   {
   return (number < 1000) ? number + 1900 : number;
                     }
function milliDif()   {
   var d = new Date();
      return d.getTime()
                  }
                  
function elapsedpretty(parm1)
{
  var elapsedsecs = 0
  var elapsedmins = 0
  
  elapsedsecs=Math.floor(parm1/1000)
  parm1=parm1%1000
  
  elapsedmins=Math.floor(elapsedsecs/60)
  elapsedsecs=elapsedsecs%60
  
  
elapsedpretty=elapsedmins + " minute"
if(elapsedmins!=1)
       elapsedpretty=elapsedpretty+"s"
  
elapsedpretty = elapsedpretty+" " + elapsedsecs+" second"
if(elapsedsecs!=1)
       elapsedpretty=elapsedpretty+"s"
  
elapsedpretty = elapsedpretty+ " "+parm1+" millisecond"
if(parm1!=1)
       elapsedpretty=elapsedpretty+"s"
  
  return elapsedpretty;
}  
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -