使用PHP读取.properties文件 [英] Read .properties files using PHP
问题描述
Possible Duplicate:
Does PHP allow *.properties file as in Java?
如何使用PHP读取/解析.properties文件?
How to read/parse .properties file using PHP?
推荐答案
.properties
文件通常在Java
平台中使用. PHP中与之对应的是.ini
文件. PHP可以使用 parse_ini_file()
来本地解析.ini
文件.请参阅以下stackoverflow问题: PHP是否允许像Java一样允许* .properties文件?.
.properties
files are usually used in Java
platform. Its counterpart in PHP is .ini
files. .ini
files can be parsed natively by PHP using parse_ini_file()
. See this stackoverflow question: Does PHP allow *.properties file as in Java?.
不过,如果您想读取和解析.properties
文件,则必须手动执行.在Google上进行的快速搜索将我带到以下结果:
Still, if you would like to read and parse .properties
files, you have to do that manually. A quick search on Google take me to the following result:
- 读取Java样式PHP中的属性文件-Github 存储库
- reading java-style properties file in PHP - Github repository
希望这会有所帮助:)
这篇关于使用PHP读取.properties文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!