首頁  >  文章  >  後端開發  >  在PHP中的parse_ini_string()函數

在PHP中的parse_ini_string()函數

WBOY
WBOY轉載
2023-09-04 11:37:06693瀏覽

在PHP中的parse_ini_string()函數

parse_ini_string()函數解析配置字串。該函數在成功時傳回設定的關聯數組。在失敗時返回FALSE。

語法

parse_ini_string(file_path, process_sections)

Parameters

  • #file_path − The ini file to be parsed.

  • #process_sections − If set to TRUE, you will get a multidimensional array with section names and settings included.

Return

##The 。
[names]
one = Anne
[urls]
host1 = "https://www.example1.com"

輸出

<?php
   print_r(parse_ini_string("demo.ini"));
?>

#

以上是在PHP中的parse_ini_string()函數的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:tutorialspoint.com。如有侵權,請聯絡admin@php.cn刪除