婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識(shí)庫 > 如何讀取一個(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)民參考!
  • 推薦文章
    主站蜘蛛池模板: 河源市| 兴仁县| 洪江市| 谢通门县| 南昌县| 忻州市| 锡林郭勒盟| 称多县| 永吉县| 昔阳县| 汝南县| 尼勒克县| 南川市| 庐江县| 铜陵市| 平罗县| 黄石市| 东明县| 恭城| 大宁县| 得荣县| 衡阳市| 马尔康县| 西畴县| 武陟县| 洞头县| 贵南县| 仙桃市| 张家口市| 武宣县| 阳新县| 元谋县| 清水县| 福清市| 京山县| 当阳市| 铁岭市| 锡林浩特市| 泰宁县| 襄城县| 灵寿县|