1 Project: cross-platform INI file read/write API (C ++ Version)
Version: 0.2.1
Authorization method: GNU GPL
Copyright ownership (c) 2007 midapex
This procedure is free software; you may release and/or modify this procedure in accordance with the GNU General Public Authorization terms published by the Free Software Foundation; whether you are based on the second version of this authorization or any version you choose to release later.
This procedure
The batch processing function is very powerful. Below I wrote a script that can read the ini configuration file.
------------------------------ Readini. Bat ---------------------------------------------
Rem @ echo off setlocal enabledelayedexpansionNumber of REM echo parameters: % 0% 1% 2% 3Set Name =Set namelist =Set Param =Set paramlist =For/F "EOL =; tokens = 1 * usebackq delims =" % I in (% 1) Do (Rem echo % I % JSet P = % IRem echo P =! P!Rem ec
The INI document is generally used to save the description of interface functions (for example, the sdk api Introduction Document). The INI document is generally edited and viewed using UE (ultraedit, how does one display the interface function name in the function list?
Open ue select: Advanced-> Configuration-> (double-click the list on the left) Editor display-> syntax highlight-> (open my computer, if
During project creation, you sometimes need to save some simple configuration information. You can use XML or INI files. The following is the method for reading ini in C #. I believe most of my friends have used this method.The storage of INI files is as follows,
[section]key=valuekey=value
Read Write method,
[Dllimport ("Kernel32")] Private Static extern long wr
How does PHP read all the content of a node in the INI file? Suppose there is an ini file (aa. ini) with the following content:
[Aa]
AB = 12
Ac = 123
Ad = 1234
[Bb]
Bb = 22
Bc = 343
The items in [aa] and [bb] are not fixed. how can I read only the content of all nodes in [aa?
Thank you!
Reply to discussion (solution)
$ Tmp = parse_ini_file (
At this time, I found that cainiao is now learning how to write old birds and referencing old birds.Article
ReferenceHttp://www.pin5i.com/showtopic-8418.html
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Using
System. runtime. interopservices;
Using
System. text; Namespace INIFILE{ /// /// Class for reading and writing INI files /// Call two APIs in kernel32.dll
I have read the VC knowledge base from the previous article "Implementing multilingual Menus"Article. The method used in that article is to define two menus in the resource, one in English and one in Chinese...
IfProgramIt is very inappropriate to use that method to build a language of 100 countries. The reason is that the software author cannot speak 100 languages... the most important thing is that it is very inconvenient!
The best way is to save the menu to the
Option explicit on
Module ini'Ini Cont. bas ver 1.0 + A ini '==================================== =========================================='Getintfromini (sectionname, keyname, defaultvalue, inipath)''Sectionname: node name
'Keyname: configuration item name'Defaultvalue: Default Value
'Inipath: ini configuration file path
''================================================ ==================================
How to modify the configuration file (my. ini) of MySQL5.6 in Windows: bitsCN.com
How to modify the configuration file (my. ini) of MySQL 5.6 in Windows
This is also a small experience. As required by the experiment, I need to modify the MySQL configuration file my. ini. Before MySQL 5.6.8, the configuration file is directly placed in the installation directory
Php. ini optimization method in php. Ctrl + y search: after disable_functions is found, add the following code (the function is not executed in the php Tutorial here): copy the content to the clipboard exec, system, passthru, error_log, ini _ ctrl + y search: disable_functions
Find and add after =
(All functions cannot be executed in the php Tutorial.) Code:
Copy content to clipboard
Exec, system, passthru
Where can I find the PHP configuration file php. ini nbsp; php. ini? Developers who have done CMS know that background login and file upload in the LAMP environment are very prone to problems. most of them are due to PHP configuration problems, so it is vital to optimize PHP. For PHP optimization, we mainly adjust and set the relevant main parameters in php. ini
Article Title: where is php. ini ?. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
On Unix, the php. ini file is put on/usr/local/lib by default, because the default storage path is
/Lib, but you can use the -- with-config-file-path parameter during compilation to
Using Python to read and write INI files,
This example describes how to read and write INI files in Python. Share it with you for your reference. The details are as follows:
For example, an update. ini file contains the following content:
[ZIP]EngineVersion=0DATVersion=5127FileName=dat-5127.zipFilePath=/pub/antivirus/datfiles/4.x/FileSize=13481555Checksum=6037,02
You can directly go to include/common. inc. php.----// Disable session. auto_startIf (ini_get ('session. auto_start ')! = 0){Exit ('php. ini session. auto_start must is 0! ');}----Delete.============================After this is deleted, find it again...There is anotherIf (ini_get ('register _ globals ')){Exit ('php. ini register_globals must is Off! ');}After deletion, it ca
This blog I mainly want to summarize the use of the INI file in Python, the recent writing Python operation MySQL database, then as a tester test environment including (test environment, UAT environment, production environment) each need to connect the database IP, port, will be different, So how to easily modify the content, you think of the configuration file, next we will understand the Python configuration file
Get a string from an. ini file
Var
Strresult:pchar;
Begin
GetPrivateProfileString (
´windows´,//[] The name of the title in
´nullport´,//= number before the name
´nil´,//If the string is not found, the default value returned
Strresult,//Store get character
100,//Get maximum allowable length of character
FileName of the ´c:\forwin95\win.ini´//call
);
Edit1.text:=strresult; Show Get string
Get an integer from an. in
Original: C # read INI fileExcerpt from: Ituri tutorial WebHttp://www.etoow.com/html/2007-08/1187271505-1.htmlAlthough Microsoft has recommended in Windows to replace the INI file with the registry, but in the actual application, the INI file still has its place, especially now the popularity of green software, more and more programs to save some of their own con
Figure out the path of the PHP configuration file php. ini,
Recently, some bloggers asked which directory does php. ini exist? Or why does the modification take effect after php. ini? Based on the above two questions, I think it is necessary to teach the bloggers who are new to PHP how to find the path directory for PHP to call php.
This article describes how to read and write ini files in Python. It provides an example of how to read, write, and modify ini configuration files in Python, for more information about how to read and write INI files in Python, see the following example. Share it with you for your reference. The details are as follows:
For example, an update.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.