校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識(shí)庫(kù) > 如何讀取一個(gè).ini文件?

如何讀取一個(gè).ini文件?

熱門標(biāo)簽:遼寧營(yíng)銷智能外呼系統(tǒng)價(jià)格多少 推銷電話機(jī)器人怎么打電話的 自適應(yīng)地圖標(biāo)注 常州智能外呼電銷機(jī)器人如何 教育機(jī)構(gòu)地圖標(biāo)注 重慶400電話哪里辦理 400電話是怎么申請(qǐng) 語音電銷機(jī)器人視頻 武漢如何辦理400電話

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 flgSection     
  Dim strTempData 

  Application("Service") = ""
  Application("User") = ""
  strLineData = "" 
  strTempData = ""
  flgSection = 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

While Not objTs.AtEndOfStream
    strLineData = objTs.ReadLine
 
 If Trim(strLineData) > "" Then
        If flgSection = True And Mid(strLineData,1,1) = "[" And _
     
  Mid(strLineData,Len(strLineData),1) = "]" Then
   
   objTs.Close
       
 Set objTs = Nothing
   
   Set objFs = Nothing
   
   Exit Sub
   
  End If

   
  If strLineData = CONST_DB_SECTION Then
   
   flgSection = True
 
   End If

 

If flgSection = True Then
      If Mid(strLineData,1,7) = "Service" Then
     
  strTempData = Trim(Mid(strLineData,8,Len(strLineData)-7))
     
  If Mid(strTempData,1,1) = "=" Then
     
    strTempData = Trim(Mid(strTempData,2,Len(strTempData)-1))
     
    Application.Lock
     
     Application("Service") = Mid(strTempData,2,Len(strTempData)-2)
     
    Application.UnLock
   
   End If
    End If
    If Mid(strLineData,1,4) = "User" Then
     
  strTempData = Trim(Mid(strLineData,5,Len(strLineData)-4))
     
  If Mid(strTempData,1,1) = "=" Then
     
  strTempData = Trim(Mid(strTempData,2,Len(strTempData)-1))
     
  Application.Lock
     
  Application("User") = Mid(strTempData,2,Len(strTempData)-2)
     
  Application.UnLock
      End If
End If
End If
End If
Wend
objTs.Close
Set objTs = Nothing
Set objFs = Nothing
End Sub
/script>

 

 

[1]

標(biāo)簽:朔州 威海 柳州 邯鄲 雞西 中山 遵義 襄陽

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《如何讀取一個(gè).ini文件?》,本文關(guān)鍵詞  如何,讀取,一個(gè),.ini,文件,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《如何讀取一個(gè).ini文件?》相關(guān)的同類信息!
  • 本頁收集關(guān)于如何讀取一個(gè).ini文件?的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 颍上县| 广安市| 东源县| 诸暨市| 西安市| 西城区| 新泰市| 洛南县| 湛江市| 云霄县| 乌拉特中旗| 抚州市| 江都市| 濉溪县| 宣城市| 绥德县| 青浦区| 本溪市| 灵山县| 阿尔山市| 广德县| 铅山县| 云龙县| 柏乡县| 商丘市| 桐柏县| 昌邑市| 随州市| 资溪县| 穆棱市| 寻乌县| 铁力市| 客服| 安平县| 依兰县| 隆昌县| 崇义县| 澎湖县| 冀州市| 怀化市| 霍城县|