xunwap

专注移动互联网服务

正在浏览由 mobile 发布的文章

	Google Data APIs
	Google Account Authentication API
	Google Data APIs
	Google Account Authentication API
	Google AJAX Language API
	Google App Engine API
	Google Chart API
	Google Calendar APIs and Tools API
	Google Spreadsheets API
	iGoogle Themes API
	Google Gadgets API
	Google Visualization API
	Google AJAX Feed API
	Google OpenSocial API
	Google Social Graph API
	Google Contacts Data API
	Picasa Web Albums Data API
	You Tube Data API
	Blogger Data API
	Google FeedBurner API
	Google Android API
	Google Talk XMPP API
	Google Protocol Buffer API
	Google AJAX Libraries API
	Google Adwords API
	Google AdSense API
	Google Checkout API
	Google Book Search Book API
	Google AJAX Search API
	Google Maps API
	Google Mapplets API
	Google KML API
	Google Static Maps API
	Google Desktop Gadget API
	Google Desktop Search API
	Google Document List API
	Google Gears API
	Google Notebook Data API

本站原创文章,转载请注明出处。

在Linux下编写server的配置文件时,有两种标准的做法,一种是使用INI文件,一种是使用XML文件。
XML可以支持复杂的嵌套式的配置选项,而INI文件对于结构简单的配置文件则十分实用。
这里推荐一个有用的INI解析工具: INIParser
INIParser的使用比较简单,主要使用下面的函数:

使用: iniparser_load() 加载一个要解析的INI文件:
使用下面的函数来获取具体的INI选项的值:
 iniparser_getstring()
 iniparser_getint()
 iniparser_getdouble()
 iniparser_getboolean()
在解析完配置文件之后,使用下面的函数来释放解析INI文件时所使用的资源
 iniparser_freedict().

说明: 在定位具体的INI配置项时,使用”:”来分隔对应的”段名”和”配置项名”,比如”config_section:config_name”

本站原创文章,转载请注明出处。