[root@NJ232:~]$
[root@NJ232:~]$more tt.php
m#!/opt/php/bin/php -q
<?php
while(1){
sleep(2);
$arr = require("bb.php"); ##可见即便是在while()循环中,php也是可以实时获取配置信息的。这里不会报重复require()的错误!
echo $arr['aaa'],"
";
}
?>
[root@NJ232:~]$
[root@NJ232:~]$more bb.php
<?php
return array ("aaa"=>3,"bbb"=>222);
?>
[root@NJ232:~]$