当前位置:编程学习 > asp >>

Asp中关于Global.asa文件的编程(-)

答案:作者:virtualboy

功能是读取发布目录下一个ini文件信息

<OBJECT ID="agobjOraSession" RUNAT="Server" PROGID="OracleInProcServer.XOraSession" SCOPE="APPLICATION">
</OBJECT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Const CONST_FL_NAME = "\GetAttributeCode.ini"
Const CONST_FL_FORREADING = 1
Const CONST_DB_SECTION = "[DB_CONNECTION]"Sub Application_OnStart
On Error Resume Next
        
  Dim objFs      
  Dim objTs          
  Dim strLineData      
  Dim 易做图Section      
  Dim strTempData  
        
  Application("Service") = ""
  Application("User") = ""
  strLineData = ""  
  strTempData = ""
  易做图Section = False


  Set objFs = Server.CreateObject ("Scripting.FileSystemObject")
  Set objTs = objFs.OpenTextFile(Server.MapPath(CONST_FL_NAME),CONST_FL_FORREADING,False)
  If Err.Number <> 0 Then
    Err.Clear
     Set objTs = Nothing
    Set objFs = Nothing
    Exit Sub
  End If



上一个:ASP+JS时的
下一个:ASP/DHTML Image Preloader

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,