E
E
etojemph2014-09-12 18:55:09
Delphi
etojemph, 2014-09-12 18:55:09

How to find the parameter in the ini file?

Hello, when you start the program, an ini file is created, a value is written to it, for example:
[Registration]
Check = Has already been (or just a number - 1)
How can I find out what exactly is written in the third parameter to compare it at startup?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2014-09-12
@etojemph

Here everything is intelligibly written
code-code.narod.ru/art/ini.html

D
Dmitry, 2014-09-12
@mytmid

INI:

[reg]
check [] = 0
check [] = 0
check [] = 1

$file = 'ссылка на файл';
$ini = parse_ini_file ( $file , true, INI_SCANNER_RAW);
if( $ini['reg']['check'][2]  == 1 ){
   // выполнится если третий элемент равен 1
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question