应该如何正确地征句?
<?php
$settings = parse_ini_file("settings.ini", true);
function testing() { return $GLOBALS[$settings['Language']['lang']]; }
echo testing();
?>
请注意,指出$settings
必须在自定义功能上方,这是许多功能,需要等...
谢谢
您需要将$settings
参数传递给函数:
<?php
function testing($settings) { return $GLOBALS[$settings['Language']['lang']]; }
$settings = parse_ini_file("settings.ini", true);
echo testing($settings);
?>