Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了parse_ini_file函数错误。
parse_ini_file
这是导致问题的文件部分:
TYPE["A"] = 1 TYPE["B"] = 2 TYPE["C"] = 3
这在 PHP 5.3.1 中解析得很好——但它PHP Warning: Error parsing在 PHP 5.2.17 中抛出了
PHP Warning: Error parsing
是否可以在 PHP 5.2.x 的 ini 文件中将字符串设置为数组键?
您可以将的第二个参数设置parse_ini_file为true以获取多维数组。
你的ini文件:
[type] A = 1 B = 2 C = 3
你PHP:
$arr = parse_ini_file('my_ini_file', true);
结果:
Array ( [type] => Array ( [A] => 1 [B] => 2 [C] => 3 ) )
我可以使用 DOMXPath 来做,但我想只用 DOMDocument 来做。
我尝试了类似的东西
$dom->getElementsByTagName('yweather:condition') //or $dom->getElementsByTagNameNS('yweat
0 c++ - 当控制台处于 UTF-8 模式时,popen() 中的文本会过早地被删除
1 regex - Rails 3 使用正则表达式提取链接的域并将其打印在括号中,
2 algorithm - 在在线国际象棋游戏中,如何将延迟对时间控制的影响降到最低?
3 c++ - C++ 的内存分配限制
Reference php × 1429865 c/c++ × 756500 nginx × 49975 mongodb × 159057 mybatis × 3233 anaconda × 13410 pycharm × 14671 python × 1902243 vscode × 56040 docker × 110988 github × 49000 flask × 49129 ffmpeg × 24037 jmeter × 16910 matplotlib × 63493 bootstrap × 54641