基 础 函 数 参 考


IniReadSectionNames

读配置文件(*.ini)的全部字段信息.

IniReadSectionNames ( "文件名" )

参 数

文件名 目标 .ini 文件名.

返 回 值

成功: 返回含有所有字段名的数组.
失败: 设置 @error 为失败.

备 注

标准 INI 文件结构如下:
[字段名]
关键字=值

本函数返回的数组 $result[0] 中储存数组元素的数量. 如果出现 @error, 则该数组不会被创建.
只有字段中前 32767 字符被正常返回, 用于 Win9x 兼容.

相 关 函 数

IniDelete, IniWrite, IniRead, IniReadSection, IniRenameSection, IniWriteSection

函 数 示 例


Local $var = IniReadSectionNames(@WindowsDir & "\win.ini")
If @error Then
    MsgBox(4096, "", "发生错误, 可能没有 INI 文件.")
Else
    For $i = 1 To $var[0]
        MsgBox(4096, "", $var[$i])
    Next
EndIf

provider with jb51.net (unicode)