ChinaUnix.net
相关文章推荐:

c语言ini文件解析

如题。 谢谢。

by formalin14 - C/C++ - 2008-01-29 20:51:49 阅读(6215) 回复(14)

相关讨论

本帖最后由 SoforthHe 于 2011-11-25 18:46 编辑 今天做了一个简单的ini文件解析器,代码如下:[code]/** * Copyright(C) 2011 soforth * * a ini file parser * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the...

c语言ini文件解析

by SoforthHe - C/C++ - 2011-12-01 17:36:19 阅读(11446) 回复(23)

[common] name= no= [math] score= teacher= [english] score= teacher= 类似格式,怎样读出来呢?

by fly2fire - Shell - 2004-09-10 12:56:48 阅读(5462) 回复(6)

文件内容是如下格式: a=1111 b=2222 类似ini文件,但全部内容都是上面的格式,没有section。用ConfigParser解析时报错 Traceback (most recent call last): File "E:\eclipse\workspace\testProject\src\test.py", line 9, in ? acfg.read("a.cfg") File "C:\Python24\lib\ConfigParser.py", line 267, in read self._read(fp, filename) File "C:\Python24\lib\ConfigParser.py", line 462, in _read raise M...

by Gubuntu - Python - 2012-03-20 09:10:41 阅读(3761) 回复(2)

最近一个项目需要解析 .ini 文件,请哪路高人给哥好的范例代码。 另外是不是 www.php.net 最近打不开了呀?

by kytexzy - PHP - 2006-02-13 23:17:12 阅读(3297) 回复(5)

我现在看到一个函数,功能是读取odbc.ini里面的值,但是这个程序没有说明注释 不知道读取配置文件的步骤是什么,采用什么样的算法思想呢?哪本书有具体说到这东西啊?

by liumilan2009 - C/C++ - 2011-10-25 15:58:04 阅读(8041) 回复(6)

ini_parser { // $last_sect : used to special the last parsed section name. private $last_sect; function parse (&$path, &$store) { if (file_exists($path)) { $read = @file($path); foreach ($read as $value) { if (!$this->is_comment ($value)) { if ($this->is_section($value)) { // parse such section name. $value = trim($value, "["); $value = str_repla...

by a_day - PHP - 2006-09-10 22:19:30 阅读(2355) 回复(10)

在sco unix环境下 使用c语言怎样写.ini文件

by 大马虎 - C/C++ - 2003-07-16 15:50:57 阅读(1584) 回复(7)

# 数据源定义部分 [DSN] DATASOURCE = aaaa USERNAME = bbb PASSWORD = ccc # 源表与目标表对应关系,格式为:源表名->目标表名:目标表中的时间字段 [MAP] source_table1->target_table1:field1 source_table2->target_table2:field2 . . . . . . 上面是文件的内容,.号表示还有多行,我省略了 [MAP]段会有很多行,我没全写 目标:通过Perl程序解析这个ini文件,把[DSN]段中的DATASOUCE、USERNAME和PASSWORD部分的值都赋值给程序...

by zhouhaiming - Perl - 2007-09-06 12:00:19 阅读(3005) 回复(10)

本帖最后由 cfgrpg 于 2012-05-05 00:15 编辑 配置文件config.ini的内容如下:[code][GVAP] GVAP_DEV_S_ADDR=device.xxx.net GVAP_DEV_S_PORT=5580 DeviceSerialNumber=3320288800000012 BIND_USER= GVAP_DEV_RESET_FLAG=0 [UPNP] UPNP_DEV_S_ADDR=ddns.xxx.net UPNP_DEV_S_PORT=5555[/code]另一个文件RT2870AP.dat的内容如下:[code]#The word of "Default" must not be removed Default CountryRegion=5 CountryRegionABand=7 ...

by cfgrpg - Shell - 2012-08-12 10:02:15 阅读(5651) 回复(7)

有一a.ini文件。 ------------------- disk_id=5540 ipaddr=192.168.0.200 ---------------- 如何取出5540,192.168.0.200 谢谢!!

by udb6688 - C/C++ - 2008-07-17 19:17:24 阅读(2403) 回复(11)