parse_ini_string

(PHP 5 >= 5.3.0, PHP 7)

parse_ini_string锟斤拷锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷

说锟斤拷

parse_ini_string ( string $ini [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL ]] ) : array

parse_ini_string() 锟斤拷锟斤拷 ini 锟街凤拷锟斤拷锟斤拷锟斤拷锟斤拷墓锟斤拷锟斤拷锟斤拷锟�

ini 锟街凤拷锟斤拷锟侥革拷式锟轿匡拷 php.ini

锟斤拷锟斤拷

ini

ini 锟街凤拷锟斤拷锟斤拷锟斤拷

process_sections

锟斤拷锟斤拷 process_sections 锟斤拷锟斤拷为 TRUE,锟矫碉拷一锟斤拷锟斤拷维锟斤拷锟斤拷,锟斤拷锟斤拷锟斤拷锟狡猴拷锟斤拷锟矫★拷process_sections 默锟斤拷为 FALSE

scanner_mode

锟斤拷锟斤拷锟斤拷 INI_SCANNER_NORMAL (默锟斤拷)锟斤拷 INI_SCANNER_RAW 锟斤拷锟斤拷锟斤拷锟� INI_SCANNER_RAW,锟斤拷么选锟斤拷值锟斤拷锟结被锟斤拷锟斤拷锟斤拷

As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. In this mode boolean, null and integer types are preserved when possible. String values "true", "on" and "yes" are converted to TRUE. "false", "off", "no" and "none" are considered FALSE. "null" is converted to NULL in typed mode. Also, all numeric strings are converted to integer type if it is possible.

锟斤拷锟斤拷值

执锟叫成癸拷锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷,锟斤拷锟斤拷 FALSE 为失锟斤拷

注锟斤拷

Note: 锟斤拷锟斤拷锟截硷拷锟街诧拷锟斤拷锟斤拷为 ini 锟侥硷拷锟斤拷锟斤拷锟斤拷 null, yes, no, true, false, on, off, none锟皆硷拷锟斤拷值锟斤拷off锟斤拷no 锟酵达拷锟斤拷慕锟斤拷锟斤拷锟斤拷值为 yes 锟斤拷 锟斤拷确锟侥斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟绞癸拷锟� INI_SCANNER_TYPED 模式锟斤拷 锟街凤拷 ?{}|&~![()^" 锟斤拷锟斤拷锟斤拷锟轿何地凤拷使锟斤拷锟斤拷为锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街碉拷锟�

锟轿硷拷

  • parse_ini_file() - 锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟侥硷拷